Merge pull request #1410 from rrelmy/persist

Persistent data
This commit is contained in:
Rémy 2017-04-02 21:57:00 +02:00 committed by GitHub
commit 23e0a315fa
9 changed files with 98 additions and 30 deletions

View File

@ -47,6 +47,9 @@
"bin\\mysql_upgrade_wizard.exe",
"bin\\my_print_defaults.exe"
],
"persist": [
"data"
],
"checkver": {
"url": "https://downloads.mariadb.org/",
"re": "Download ([\\d.]+) Stable"

View File

@ -26,9 +26,14 @@
"bin\\mysqlslap.exe",
"bin\\my_print_defaults.exe"
],
"persist": [
"data"
],
"post_install": "
#Initialize data directory (without generating root password)
mysqld --initialize-insecure
if (!(Test-Path \"$dir\\data\\auto.cnf\")) {
mysqld --initialize-insecure
}
#Copy provided sample file to live file location
cp $dir/my-default.ini $dir/my.ini

View File

@ -6,6 +6,11 @@
"hash": "53ca945ffd3ceaa40c2c60e01218a3b7ac64e61d3907484461794ee13757cce9",
"extract_dir": "nginx-1.11.12",
"bin": "nginx.exe",
"env_set": {
"NGINX_HOME": "$dir"
},
"persist": ["conf", "html", "logs", "temp"],
"notes": "To use the correct configuration run 'nginx -p \"$env:NGINX_HOME\"' or 'nginx -p \"%NGINX_HOME%\"'",
"checkver": {
"url": "https://nginx.org/en/CHANGES",
"re": "Changes with nginx ([\\d.]+)"

View File

@ -12,11 +12,12 @@
"hash": "868a96e012222ce95c732d4e2c97d0349f8fefbd889af690cf6d2278d6844932"
}
},
"env_add_path": "nodejs",
"extract_dir": "nodejs",
"persist": [ "bin" ],
"env_add_path": [ ".", "bin" ],
"post_install": "
# Remove npmrc that makes global modules get installed in AppData\\Roaming\\npm
rm $dir\\nodejs\\node_modules\\npm\\npmrc
npm update -g",
# Set npm prefix to install modules inside bin
Set-Content -Value \"prefix=$dir\\bin\" -Path $dir\\node_modules\\npm\\npmrc",
"checkver": {
"url": "https://nodejs.org/en/download/",
"re": "LTS version: <strong>v([\\d.]+)</strong>"

View File

@ -12,11 +12,12 @@
"hash": "0eda7b5dabd72865f96985d5ef0ad7048df87a79ff52a77b352ca293f52e2930"
}
},
"env_add_path": "nodejs",
"extract_dir": "nodejs",
"persist": [ "bin" ],
"env_add_path": [ ".", "bin" ],
"post_install": "
# Remove npmrc that makes global modules get installed in AppData\\Roaming\\npm
rm $dir\\nodejs\\node_modules\\npm\\npmrc
npm update -g",
# Set npm prefix to install modules inside bin
Set-Content -Value \"prefix=$dir\\bin\" -Path $dir\\node_modules\\npm\\npmrc",
"checkver": {
"url": "https://nodejs.org/en/download/current/",
"re": "Current version: <strong>v([\\d.]+)</strong>"

View File

@ -28,15 +28,30 @@
"php.exe",
"php-cgi.exe"
],
"persist": [
"cli",
[
"php.ini-production",
"cli\\php.ini"
]
],
"env_set": {
"PHP_INI_SCAN_DIR": "$dir\\..\\conf"
"PHP_INI_SCAN_DIR": "$dir\\cli;$dir\\cli\\conf.d;"
},
"post_install": "
#Copy PHP configuration file to expected location
cp \"$dir\\php.ini-production\" \"$dir\\php.ini\"
# 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\"
}
#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\"
# Create directory for custom PHP configuration
if (!(Test-Path \"$dir\\cli\\conf.d\")) {
(New-Item -Type directory \"$dir\\cli\\conf.d\") | Out-Null
}
# 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\"
",
"checkver": {
"url": "http://windows.php.net/download/",

View File

@ -28,15 +28,30 @@
"php.exe",
"php-cgi.exe"
],
"persist": [
"cli",
[
"php.ini-production",
"cli\\php.ini"
]
],
"env_set": {
"PHP_INI_SCAN_DIR": "$dir\\..\\conf"
"PHP_INI_SCAN_DIR": "$dir\\cli;$dir\\cli\\conf.d;"
},
"post_install": "
#Copy PHP configuration file to expected location
cp \"$dir\\php.ini-production\" \"$dir\\php.ini\"
# 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\"
}
#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\"
# Create directory for custom PHP configuration
if (!(Test-Path \"$dir\\cli\\conf.d\")) {
(New-Item -Type directory \"$dir\\cli\\conf.d\") | Out-Null
}
# 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\"
",
"checkver": {
"url": "http://windows.php.net/download/",

View File

@ -4,15 +4,15 @@
"version": "3.6.1",
"architecture": {
"64bit": {
"url": "https://www.python.org/ftp/python/3.6.1/python-3.6.1-amd64.exe#/py361.exe",
"hash": "md5:ad69fdacde90f2ce8286c279b11ca188"
"url": "https://www.python.org/ftp/python/3.6.1/python-3.6.1-amd64.exe#/py3.exe",
"hash": "591922fbf5c4234b766dd672e539cba3d9a158e028e3c85c76bfec6ede56ded8"
},
"32bit": {
"url": "https://www.python.org/ftp/python/3.6.1/python-3.6.1.exe#/py361.exe",
"hash": "md5:3773db079c173bd6d8a631896c72a88f"
"url": "https://www.python.org/ftp/python/3.6.1/python-3.6.1.exe#/py3.exe",
"hash": "15dbc083264945ad1dcef8b0b712da41362f816f614acb60989541d8f426d845"
}
},
"pre_install": "copy-item $dir\\py361.exe $dir\\uninstall.exe",
"pre_install": "copy-item $dir\\py3.exe $dir\\uninstall.exe",
"installer": {
"args": [
"/quiet",
@ -25,14 +25,32 @@
},
"uninstaller": {
"file": "uninstall.exe",
"args": [ "/uninstall", "/quiet", "InstallAllUsers=0"]
"args": [
"/uninstall",
"/quiet",
"InstallAllUsers=0"
]
},
"bin": [
"python.exe",
"pythonw.exe",
[ "python.exe", "python3" ]
[
"python.exe",
"python3"
]
],
"env_add_path": [ "scripts" ],
"checkver": "<p>Latest: <a href=\".*\">Python ([\\d.]+)</a> - <a.*>.*</a></p>"
"env_add_path": [
"scripts"
],
"checkver": "<p>Latest: <a href=\".*\">Python ([\\d.]+)</a> - <a.*>.*</a></p>",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://www.python.org/ftp/python/$version/python-$version-amd64.exe#/py3.exe"
},
"32bit": {
"url": "https://www.python.org/ftp/python/$version/python-$version.exe#/py3.exe"
}
}
}
}

View File

@ -26,7 +26,12 @@
}
},
"extract_to": [ "", "devkit" ],
"env_add_path": "bin",
"persist": "gems",
"env_add_path": [ "bin", "gems\\bin" ],
"env_set": {
"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": {
"url": "http://rubyinstaller.org/downloads/",