Skip to content

Commit

Permalink
Update the release strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
sergix44 committed Nov 28, 2023
1 parent 1651633 commit f8167e7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/update-release.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.1'
coverage: none

- name: Validate composer.json and composer.lock
Expand All @@ -26,9 +26,9 @@ jobs:
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-8.2-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-php-8.1-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-8.2
${{ runner.os }}-php-8.1
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
Expand Down
14 changes: 14 additions & 0 deletions app/FixedUpdateStrategy.php
@@ -0,0 +1,14 @@
<?php

namespace App;

use LaravelZero\Framework\Components\Updater\Strategy\StrategyInterface;

class FixedUpdateStrategy extends \Humbug\SelfUpdate\Strategy\GithubStrategy implements StrategyInterface
{
public function __construct()
{
$this->setPharName(basename(\Phar::running()));
}

}
8 changes: 4 additions & 4 deletions app/Tasks/IssueWildcardCertificate.php
Expand Up @@ -188,6 +188,10 @@ function () use ($solverConfig, $store, $user, $domain, $certificate, $solver) {
return false;
}

// clear temp files
array_map('unlink', glob("$tempCertsDir/*"));
rmdir($tempCertsDir);

// clear challenges
foreach ($solvedChallenges as $solvedChallenge) {
try {
Expand All @@ -197,10 +201,6 @@ function () use ($solverConfig, $store, $user, $domain, $certificate, $solver) {
}
}

// clear temp files
array_map('unlink', glob("$tempCertsDir/*"));
rmdir($tempCertsDir);

return true;
});
}
Expand Down
4 changes: 1 addition & 3 deletions config/updater.php
@@ -1,7 +1,5 @@
<?php

use LaravelZero\Framework\Components\Updater\Strategy\GithubReleasesStrategy;

return [

/*
Expand All @@ -15,6 +13,6 @@
|
*/

'strategy' => GithubReleasesStrategy::class,
'strategy' => \App\FixedUpdateStrategy::class,

];

0 comments on commit f8167e7

Please sign in to comment.