Skip to content

Commit

Permalink
optimize archive
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Nov 9, 2022
1 parent 9721e65 commit 8c64e46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion sapi/Preprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function withPeclVersion(string $peclVersion): static

class Preprocessor
{
public string $osType;
public string $osType = 'linux';
protected array $libraryList = [];
protected array $extensionList = [];
protected string $rootDir;
Expand Down Expand Up @@ -250,6 +250,11 @@ function setOsType(string $osType)
$this->osType = $osType;
}

function getOsType()
{
return $this->osType;
}

function setPhpSrcDir(string $phpSrcDir)
{
$this->phpSrcDir = $phpSrcDir;
Expand Down
2 changes: 1 addition & 1 deletion sapi/make.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
elif [ "$1" = "archive" ] ;then
cd bin
SWOOLE_VERSION=$(./swoole-cli -r "echo SWOOLE_VERSION;")
SWOOLE_CLI_FILE=swoole-cli-v${SWOOLE_VERSION}-linux-x64.tar.xz
SWOOLE_CLI_FILE=swoole-cli-v${SWOOLE_VERSION}-<?=$this->getOsType()?>-x64.tar.xz
strip swoole-cli
tar -cJvf ${SWOOLE_CLI_FILE} swoole-cli LICENSE
mv ${SWOOLE_CLI_FILE} ../
Expand Down

0 comments on commit 8c64e46

Please sign in to comment.