This commit is contained in:
Shivam Mathur 2019-09-06 05:35:52 +05:30
parent 8f9786b73f
commit f8b0e78904
3 changed files with 3 additions and 16 deletions

View File

@ -18,10 +18,10 @@ jobs:
with: with:
version: 10.x version: 10.x
- name: npm install - name: Installing NPM
run: npm install run: npm install
- name: Install PHP - name: Installing PHP
run: node lib/install.js run: node lib/install.js
env: env:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}

View File

@ -1,13 +0,0 @@
import platform
import os
current_os = platform.system()
php_version = os.environ['php-version']
if current_os == 'Linux':
os.system("sudo chmod a+x ./src/linux.sh")
os.system("./src/linux.sh " + php_version)
elif current_os == 'Darwin':
os.system("sudo chmod a+x ./src/darwin.sh")
os.system("sh ./src/darwin.sh " + php_version)
elif current_os == 'Windows':
os.system("powershell .\src\windows.ps1 -version " + php_version)

View File

@ -5,7 +5,7 @@ const fs = require('fs');
async function get_file(filename: string) { async function get_file(filename: string) {
let github_path: string = let github_path: string =
'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/'; 'https://raw.githubusercontent.com/shivammathur/setup-php/master/src/';
const file: any = fs.createWriteStream(filename); const file: any = fs.createWriteStream(filename);
https.get(github_path + filename, function(response: any) { https.get(github_path + filename, function(response: any) {
response.pipe(file); response.pipe(file);