mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-09-14 16:54:07 +07:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
e9e024e600 | |||
a7ea0636d7 | |||
c471c0a458 | |||
277239149a | |||
9385896f2a | |||
9cabd8564d |
34
dist/index.js
vendored
34
dist/index.js
vendored
@ -354,13 +354,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||||
|
result["default"] = mod;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const os = __webpack_require__(87);
|
const os = __importStar(__webpack_require__(87));
|
||||||
const events = __webpack_require__(614);
|
const events = __importStar(__webpack_require__(614));
|
||||||
const child = __webpack_require__(129);
|
const child = __importStar(__webpack_require__(129));
|
||||||
const path = __webpack_require__(622);
|
const path = __importStar(__webpack_require__(622));
|
||||||
const io = __webpack_require__(1);
|
const io = __importStar(__webpack_require__(1));
|
||||||
const ioUtil = __webpack_require__(672);
|
const ioUtil = __importStar(__webpack_require__(672));
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
/* eslint-disable @typescript-eslint/unbound-method */
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
/*
|
/*
|
||||||
@ -804,6 +811,12 @@ class ToolRunner extends events.EventEmitter {
|
|||||||
resolve(exitCode);
|
resolve(exitCode);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (this.options.input) {
|
||||||
|
if (!cp.stdin) {
|
||||||
|
throw new Error('child process missing stdin');
|
||||||
|
}
|
||||||
|
cp.stdin.end(this.options.input);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2746,8 +2759,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||||
|
result["default"] = mod;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const tr = __webpack_require__(9);
|
const tr = __importStar(__webpack_require__(9));
|
||||||
/**
|
/**
|
||||||
* Exec a command.
|
* Exec a command.
|
||||||
* Output will be streamed to the live console.
|
* Output will be streamed to the live console.
|
||||||
|
1316
package-lock.json
generated
1316
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-php",
|
"name": "setup-php",
|
||||||
"version": "1.8.6",
|
"version": "1.8.7",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Setup PHP for use with GitHub Actions",
|
"description": "Setup PHP for use with GitHub Actions",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@ -30,21 +30,21 @@
|
|||||||
"fs": "0.0.1-security"
|
"fs": "0.0.1-security"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^25.1.4",
|
"@types/jest": "^25.2.1",
|
||||||
"@types/node": "^13.9.1",
|
"@types/node": "^13.11.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.24.0",
|
"@typescript-eslint/eslint-plugin": "^2.27.0",
|
||||||
"@typescript-eslint/parser": "^2.24.0",
|
"@typescript-eslint/parser": "^2.27.0",
|
||||||
"@zeit/ncc": "^0.21.1",
|
"@zeit/ncc": "^0.22.1",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-config-prettier": "^6.10.0",
|
"eslint-config-prettier": "^6.10.1",
|
||||||
"eslint-plugin-import": "^2.20.1",
|
"eslint-plugin-import": "^2.20.2",
|
||||||
"eslint-plugin-jest": "^23.8.2",
|
"eslint-plugin-jest": "^23.8.2",
|
||||||
"eslint-plugin-prettier": "^3.1.2",
|
"eslint-plugin-prettier": "^3.1.2",
|
||||||
"husky": "^4.2.3",
|
"husky": "^4.2.3",
|
||||||
"jest": "^25.1.0",
|
"jest": "^25.3.0",
|
||||||
"jest-circus": "^25.1.0",
|
"jest-circus": "^25.3.0",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"ts-jest": "^25.2.1",
|
"ts-jest": "^25.3.1",
|
||||||
"typescript": "^3.8.3"
|
"typescript": "^3.8.3"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -148,12 +148,28 @@ add_pecl() {
|
|||||||
add_log "$tick" "PECL" "Added"
|
add_log "$tick" "PECL" "Added"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to fetch updated formulas
|
||||||
|
update_formulae() {
|
||||||
|
brew_dir=$(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
|
||||||
|
for formula in httpd pkg-config apr apr-util argon2 aspell autoconf bison curl-openssl freetds freetype gettext glib gmp icu4c jpeg krb5 libffi libpng libpq libsodium libzip oniguruma openldap openssl@1.1 re2c sqlite tidyp unixodbc webp; do
|
||||||
|
sudo curl -o "$brew_dir"/"$formula".rb -sSL https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/"$formula".rb &
|
||||||
|
to_wait+=( $! )
|
||||||
|
done
|
||||||
|
wait "${to_wait[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
# Function to setup PHP and composer
|
# Function to setup PHP and composer
|
||||||
setup_php_and_composer() {
|
setup_php() {
|
||||||
|
if [ "$version" = "8.0" ]; then
|
||||||
|
update_formulae
|
||||||
|
fi
|
||||||
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
|
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
|
||||||
brew tap shivammathur/homebrew-php >/dev/null 2>&1
|
brew tap shivammathur/homebrew-php
|
||||||
brew install shivammathur/php/php@"$version" >/dev/null 2>&1
|
if [ "$version" = "5.6" ] || [ "$version" = "7.0" ]; then
|
||||||
brew link --force --overwrite php@"$version" >/dev/null 2>&1
|
brew install https://raw.githubusercontent.com/shivammathur/homebrew-php/master/Formula/icu4c.rb --force
|
||||||
|
fi
|
||||||
|
brew install shivammathur/php/php@"$version"
|
||||||
|
brew link --force --overwrite php@"$version"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
@ -166,10 +182,7 @@ existing_version=$(php-config --version | cut -c 1-3)
|
|||||||
# Setup PHP
|
# Setup PHP
|
||||||
step_log "Setup PHP"
|
step_log "Setup PHP"
|
||||||
if [ "$existing_version" != "$version" ]; then
|
if [ "$existing_version" != "$version" ]; then
|
||||||
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE >/dev/null 2>&1
|
setup_php >/dev/null 2>&1
|
||||||
brew tap shivammathur/homebrew-php >/dev/null 2>&1
|
|
||||||
brew install shivammathur/php/php@"$version" >/dev/null 2>&1
|
|
||||||
brew link --force --overwrite php@"$version" >/dev/null 2>&1
|
|
||||||
status="Installed"
|
status="Installed"
|
||||||
else
|
else
|
||||||
status="Found"
|
status="Found"
|
||||||
|
@ -25,10 +25,12 @@ update_ppa() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to configure PECL
|
||||||
configure_pecl() {
|
configure_pecl() {
|
||||||
if [ "$pecl_config" = "false" ] && [ -e /usr/bin/pecl ]; then
|
if [ "$pecl_config" = "false" ] && [ -e /usr/bin/pecl ]; then
|
||||||
|
sudo touch "$scan_dir"/99-pecl.ini >/dev/null 2>&1
|
||||||
for tool in pear pecl; do
|
for tool in pear pecl; do
|
||||||
sudo "$tool" config-set php_ini "$ini_file" >/dev/null 2>&1
|
sudo "$tool" config-set php_ini "$scan_dir"/99-pecl.ini >/dev/null 2>&1
|
||||||
sudo "$tool" config-set auto_discover 1 >/dev/null 2>&1
|
sudo "$tool" config-set auto_discover 1 >/dev/null 2>&1
|
||||||
sudo "$tool" channel-update "$tool".php.net >/dev/null 2>&1
|
sudo "$tool" channel-update "$tool".php.net >/dev/null 2>&1
|
||||||
done
|
done
|
||||||
@ -190,6 +192,7 @@ add_devtools() {
|
|||||||
|
|
||||||
# Function to setup the nightly build from master branch
|
# Function to setup the nightly build from master branch
|
||||||
setup_master() {
|
setup_master() {
|
||||||
|
update_ppa && $apt_install libzip-dev
|
||||||
tar_file=php_"$version"%2Bubuntu"$(lsb_release -r -s)".tar.xz
|
tar_file=php_"$version"%2Bubuntu"$(lsb_release -r -s)".tar.xz
|
||||||
install_dir=~/php/"$version"
|
install_dir=~/php/"$version"
|
||||||
sudo mkdir -m 777 -p ~/php
|
sudo mkdir -m 777 -p ~/php
|
||||||
|
Reference in New Issue
Block a user