Skip to content

Commit

Permalink
update action script file
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Sep 10, 2021
1 parent fdfde98 commit e1ec70a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ jobs:
# git status && git log -1 && git fetch --tags --force
# git status && git log -1 && git fetch --prune --unshallow
# git status && git log -1 && git fetch --depth=500 --tags --force
# - name: Generate changelog
# if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '7.4' }}
# run: |
# echo "changelog list by kite"
# php bin/kite git chlog last head --style gh-release --no-merges --fetch-tags --unshallow --file tmp/changelog.md
# cat tmp/changelog.md
- name: Test build Phar and run
if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '7.4' }}
run: |
php -d phar.readonly=0 bin/kite phar:pack -o kite-latest.phar --no-progress
php kite-latest.phar -V
14 changes: 7 additions & 7 deletions app/Kite.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,28 +111,28 @@ public static function logger(): Logger
}

/**
* @param bool $onDisk Will clear prefix 'phar://', if on phar package.
* @param bool $rmPharMark Will clear prefix 'phar://', if on phar package.
*
* @return string
*/
public static function basePath(bool $onDisk = true): string
public static function basePath(bool $rmPharMark = true): string
{
return $onDisk ? Dir::clearPharPath(BASE_PATH) : BASE_PATH;
return $rmPharMark ? Dir::clearPharPath(BASE_PATH) : BASE_PATH;
}

/**
* @param string $path
* @param bool $onDisk Will clear prefix 'phar://', if on phar package.
* @param bool $rmPharMark Will clear prefix 'phar://', if on phar package.
*
* @return string
*/
public static function getPath(string $path = '', bool $onDisk = true): string
public static function getPath(string $path = '', bool $rmPharMark = true): string
{
if (!$path) {
return self::basePath($onDisk);
return self::basePath($rmPharMark);
}

return self::basePath($onDisk) . '/' . $path;
return self::basePath($rmPharMark) . '/' . $path;
}

/**
Expand Down

0 comments on commit e1ec70a

Please sign in to comment.