Suggested persist changes (see #1410)

This commit is contained in:
Luke Sampson 2017-03-30 15:14:20 +11:00
parent 76ee60e56a
commit 057d7e7e87
2 changed files with 12 additions and 10 deletions

View File

@ -28,20 +28,21 @@
"php.exe",
"php-cgi.exe"
],
"persist": "conf",
"env_set": {
"PHP_INI_SCAN_DIR": "$persist_dir\\conf"
"PHP_INI_SCAN_DIR": "$dir\\conf"
},
"post_install": "
#Copy ini scan dir from old location before persistant update
if ((Test-Path \"$dir\\..\\conf\") -and !(Test-Path \"$persist_dir\\conf\")) {
Write-Host -ForegroundColor Cyan 'We are moving your php configuration to scoop/persist/php/conf'
Move-Item \"$dir\\..\\conf\" \"$persist_dir\\conf\"
# Copy ini scan dir from old location before persistent update
if ((Test-Path \"$dir\\..\\conf\") -and !(Test-Path \"$dir\\conf\")) {
Write-Host -ForegroundColor Cyan 'We are moving your php configuration to $dir\\conf'
Move-Item \"$dir\\..\\conf\" \"$dir\\conf\"
}
#Copy PHP configuration file to expected location
# Copy PHP configuration file to expected location
cp \"$dir\\php.ini-production\" \"$dir\\php.ini\"
#Enable extensions to be found in installation-relative folder (the default is to search C:/php)
# Enable extensions to be found in installation-relative folder (the default is to search C:/php)
(gc \"$dir\\php.ini\") | % { $_ -replace '; extension_dir = \"ext\"', 'extension_dir = \"ext\"' } | sc \"$dir\\php.ini\"
",
"checkver": {

View File

@ -26,10 +26,11 @@
}
},
"extract_to": [ "", "devkit" ],
"env_add_path": ["bin", "$persist_dir\\gem\\bin"],
"persist": "gems",
"env_add_path": [ "bin", "gems\\bin" ],
"env_set": {
"GEM_HOME": "$persist_dir\\gem",
"GEM_PATH": "$persist_dir\\gem"
"GEM_HOME": "$dir\\gems",
"GEM_PATH": "$dir\\gems"
},
"post_install": "pushd $dir\\devkit;echo \"---`n- $dir\" | out-file config.yml -enc default; ruby dk.rb install;popd;",
"checkver": {