Skip to content

Commit 6aade2f

Browse files
committed
Added automatic update to release version for chocolatey scripts.
1 parent 61d0706 commit 6aade2f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

fn/chocolatey/functions.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
44
<metadata>
55
<id>functions</id>
6-
<version>0.2.36</version>
6+
<version>0.2.57</version>
77
<packageSourceUrl>https://github.com/iron-io/functions</packageSourceUrl>
88

99
<title>Iron.io Functions (Install)</title>

fn/chocolatey/tools/chocolateyinstall.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$packageName= 'functions'
44
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
5-
$url = 'https://github.com/iron-io/functions/releases/download/0.2.25/fn.exe'
5+
$url = 'https://github.com/iron-io/functions/releases/download/0.2.57/fn.exe'
66
#$fileLocation = Join-Path $toolsDir 'NAME_OF_EMBEDDED_INSTALLER_FILE'
77
#$fileLocation = '\\SHARE_LOCATION\to\INSTALLER_FILE'
88

release.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ set -ex
44
user="iron"
55
service="functions"
66
version_file="api/version/version.go"
7+
# Chocolatey specific files
8+
chocolatey_spec_file="fn/chocolatey/functions.nuspec"
9+
chocolatey_install_file="fn/chocolatey/tools/chocolateyinstall.ps1"
10+
711
tag="latest"
812

913
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
1519
version=$(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file)
1620
echo "Version: $version"
1721

22+
# Update chocolatey version
23+
sed 's|<version>.*</version>|<version>'$version'</version>|' $chocolatey_spec_file > "$chocolatey_spec_file.tmp"
24+
mv "$chocolatey_spec_file.tmp" $chocolatey_spec_file
25+
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"
26+
mv "$chocolatey_install_file.tmp" $chocolatey_install_file
27+
1828
make docker-build
1929

2030
sed "s/release=.*/release=\"$version\"/g" fn/install.sh > fn/install.sh.tmp

0 commit comments

Comments
 (0)