From f1cbe1d2b772a41cd156375c34fda5728a14ea3b Mon Sep 17 00:00:00 2001 From: Issac Lin Date: Sat, 4 Jun 2022 23:35:59 +0800 Subject: [PATCH] refreshenv: Add version 2019.03.06 (#3644) * refreshenv: Add version 2019.03.06 * use 'HEAD' instead of 'master' --- bucket/refreshenv.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 bucket/refreshenv.json diff --git a/bucket/refreshenv.json b/bucket/refreshenv.json new file mode 100644 index 0000000000..cb3baa489d --- /dev/null +++ b/bucket/refreshenv.json @@ -0,0 +1,24 @@ +{ + "version": "2019.03.06", + "description": "Provides a command to refresh environment variables in command prompt (cmd).", + "homepage": "https://chocolatey.org/", + "license": "Apache-2.0", + "url": "https://raw.githubusercontent.com/chocolatey/choco/HEAD/src/chocolatey.resources/redirects/RefreshEnv.cmd", + "hash": "9b251737a6b6ace9fde45b64fd653b04575c6416f15112fbe1697a47b14990e6", + "bin": "RefreshEnv.cmd", + "checkver": { + "script": [ + "# Using script to get version number from date, e.g. 6 Mar, 2019 -> 2019.03.06", + "$url = 'https://github.com/chocolatey/choco/commits/HEAD/src/chocolatey.resources/redirects/RefreshEnv.cmd'", + "$regex = 'Commits on ([\\w\\s,]+)'", + "$cont = $(Invoke-WebRequest $url).Content", + "if(!($cont -match $regex)) { error \"Could match '$regex' on '$url'\"; return }", + "$script_ver = $(Get-Date $matches[1]).ToString('yyyy.MM.dd')", + "Write-Output $script_ver" + ], + "regex": "([\\d.]+)" + }, + "autoupdate": { + "url": "https://raw.githubusercontent.com/chocolatey/choco/HEAD/src/chocolatey.resources/redirects/RefreshEnv.cmd" + } +}