diff --git a/fn/chocolatey/functions.nuspec b/fn/chocolatey/functions.nuspec index 0d00ce95..c65619b2 100644 --- a/fn/chocolatey/functions.nuspec +++ b/fn/chocolatey/functions.nuspec @@ -3,7 +3,7 @@ functions - 0.2.36 + 0.2.57 https://github.com/iron-io/functions Iron.io Functions (Install) diff --git a/fn/chocolatey/tools/chocolateyinstall.ps1 b/fn/chocolatey/tools/chocolateyinstall.ps1 index c71dd380..f07a5c05 100644 --- a/fn/chocolatey/tools/chocolateyinstall.ps1 +++ b/fn/chocolatey/tools/chocolateyinstall.ps1 @@ -2,7 +2,7 @@ $packageName= 'functions' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" -$url = 'https://github.com/iron-io/functions/releases/download/0.2.25/fn.exe' +$url = 'https://github.com/iron-io/functions/releases/download/0.2.57/fn.exe' #$fileLocation = Join-Path $toolsDir 'NAME_OF_EMBEDDED_INSTALLER_FILE' #$fileLocation = '\\SHARE_LOCATION\to\INSTALLER_FILE' diff --git a/release.sh b/release.sh index ef51e231..ab724f13 100755 --- a/release.sh +++ b/release.sh @@ -4,6 +4,10 @@ set -ex user="iron" service="functions" version_file="api/version/version.go" +# Chocolatey specific files +chocolatey_spec_file="fn/chocolatey/functions.nuspec" +chocolatey_install_file="fn/chocolatey/tools/chocolateyinstall.ps1" + tag="latest" if [ -z $(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file) ]; then @@ -15,6 +19,12 @@ perl -i -pe 's/\d+\.\d+\.\K(\d+)/$1+1/e' $version_file version=$(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file) echo "Version: $version" +# Update chocolatey version +sed 's|.*|'$version'|' $chocolatey_spec_file > "$chocolatey_spec_file.tmp" +mv "$chocolatey_spec_file.tmp" $chocolatey_spec_file +sed 's|https://github.com/iron-io/functions/releases/download/.*/fn.exe|https://github.com/iron-io/functions/releases/download/'$version'/fn.exe|' $chocolatey_install_file > "$chocolatey_install_file.tmp" +mv "$chocolatey_install_file.tmp" $chocolatey_install_file + make docker-build sed "s/release=.*/release=\"$version\"/g" fn/install.sh > fn/install.sh.tmp