Skip to content

Commit

Permalink
php & php-nts: fix persistence
Browse files Browse the repository at this point in the history
See #2897
  • Loading branch information
r15ch13 committed Jan 17, 2019
1 parent d23552a commit 16084ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
15 changes: 5 additions & 10 deletions bucket/php-nts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"homepage": "http://windows.php.net",
"homepage": "https://windows.php.net/",
"license": {
"identifier": "PHP-3.01",
"url": "https://secure.php.net/license/"
Expand Down Expand Up @@ -30,18 +30,13 @@
"env_set": {
"PHP_INI_SCAN_DIR": "$dir\\cli;$dir\\cli\\conf.d;"
},
"post_install": [
"# Copy ini scan dir from old location before persistent update",
"if ((Test-Path \"$dir\\..\\conf\") -and !(Test-Path \"$dir\\cli\\conf.d\")) {",
" Write-Host -ForegroundColor Cyan \"We are moving your php configuration to $dir\\cli\\conf.d\"",
" Move-Item \"$dir\\..\\conf\" \"$dir\\cli\\conf.d\"",
"}",
"",
"pre_install": [
"# Create directory for custom PHP configuration",
"if (!(Test-Path \"$dir\\cli\\conf.d\")) {",
" (New-Item -Type directory \"$dir\\cli\\conf.d\") | Out-Null",
"}",
"",
"}"
],
"post_install": [
"# Enable extensions to be found in installation-relative folder (the default is to search C:/php)",
"(gc \"$dir\\cli\\php.ini\") | % { $_ -replace '; extension_dir = \"ext\"', 'extension_dir = \"ext\"' } | sc \"$dir\\cli\\php.ini\""
],
Expand Down
15 changes: 5 additions & 10 deletions bucket/php.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"homepage": "http://windows.php.net",
"homepage": "https://windows.php.net/",
"license": {
"identifier": "PHP-3.01",
"url": "https://secure.php.net/license/"
Expand Down Expand Up @@ -30,18 +30,13 @@
"env_set": {
"PHP_INI_SCAN_DIR": "$dir\\cli;$dir\\cli\\conf.d;"
},
"post_install": [
"# Copy ini scan dir from old location before persistent update",
"if ((Test-Path \"$dir\\..\\conf\") -and !(Test-Path \"$dir\\cli\\conf.d\")) {",
" Write-Host -ForegroundColor Cyan \"We are moving your php configuration to $dir\\cli\\conf.d\"",
" Move-Item \"$dir\\..\\conf\" \"$dir\\cli\\conf.d\"",
"}",
"",
"pre_install": [
"# Create directory for custom PHP configuration",
"if (!(Test-Path \"$dir\\cli\\conf.d\")) {",
" (New-Item -Type directory \"$dir\\cli\\conf.d\") | Out-Null",
"}",
"",
"}"
],
"post_install": [
"# Enable extensions to be found in installation-relative folder (the default is to search C:/php)",
"(gc \"$dir\\cli\\php.ini\") | % { $_ -replace '; extension_dir = \"ext\"', 'extension_dir = \"ext\"' } | sc \"$dir\\cli\\php.ini\""
],
Expand Down

0 comments on commit 16084ab

Please sign in to comment.