-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316 from jingjingxyk/experiment_v4.8.x
同步experiment分支
- Loading branch information
Showing
6 changed files
with
115 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,56 @@ | ||
echo " install deps " | ||
|
||
__CURRENT_DIR__=$(cd "$(dirname "$0")";pwd) | ||
#!/usr/bin/env bash | ||
<?php if (in_array($this->buildType, ['dev','debug'])) : ?> | ||
set -x | ||
set -x | ||
<?php endif; ?> | ||
<?= implode(PHP_EOL, $this->preInstallCommands) .PHP_EOL ?> | ||
|
||
__CURRENT_DIR__=$(cd "$(dirname "$0")";pwd) | ||
|
||
echo " install deps " | ||
|
||
<?php if ($this->osType == 'macos') : ?> | ||
<?php foreach ($this->preInstallCommands['macos'] as $item) :?> | ||
<?= $item . PHP_EOL ?> | ||
<?php endforeach ;?> | ||
<?php endif ;?> | ||
|
||
<?php if ($this->osType == 'linux') : ?> | ||
OS_RELEASE=$(awk -F= '/^ID=/{print $2}' /etc/os-release |tr -d '\n' | tr -d '\"') | ||
|
||
|
||
|
||
function os_alpine_release() { | ||
echo "${OS_RELEASE}" | ||
<?php foreach ($this->preInstallCommands['alpine'] as $item) :?> | ||
<?= $item . PHP_EOL ?> | ||
<?php endforeach ;?> | ||
return 0 | ||
} | ||
|
||
function os_debian_release() { | ||
echo "${OS_RELEASE}" | ||
<?php foreach ($this->preInstallCommands['debian'] as $item) :?> | ||
<?= $item . PHP_EOL ?> | ||
<?php endforeach ;?> | ||
return 0 | ||
} | ||
|
||
function os_ubuntu_release() { | ||
echo "${OS_RELEASE}" | ||
<?php foreach ($this->preInstallCommands['ubuntu'] as $item) :?> | ||
<?= $item . PHP_EOL ?> | ||
<?php endforeach ;?> | ||
return 0 | ||
} | ||
|
||
|
||
if [ "$OS_RELEASE" = 'alpine' ]; then | ||
os_alpine_release | ||
elif [ "$OS_RELEASE" = 'debian' ]; then | ||
os_debian_release | ||
elif [ "$OS_RELEASE" = 'ubuntu' ]; then | ||
os_ubuntu_release | ||
else | ||
echo 'no support OS' | ||
fi | ||
|
||
<?php endif ;?> |