summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Kubik <ondrej.kubik@canonical.com>2017-11-04 19:42:11 +0000
committerOndrej Kubik <ondrej.kubik@canonical.com>2018-02-21 22:29:23 +0000
commitf7920da0cf74290ffec30a967a1d70ab36d22268 (patch)
tree5ef4f642157dba6502ce7ab9e5cc971483009a6b
parentd7ea73ff8287d69583b74f779470fce6d34f30db (diff)
downloadwekan-f7920da0cf74290ffec30a967a1d70ab36d22268.tar.gz
wekan-f7920da0cf74290ffec30a967a1d70ab36d22268.tar.bz2
wekan-f7920da0cf74290ffec30a967a1d70ab36d22268.zip
fixing go build error because of go version used on build server
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
-rw-r--r--snapcraft.yaml16
1 files changed, 16 insertions, 0 deletions
diff --git a/snapcraft.yaml b/snapcraft.yaml
index ce41bdf3..d9e7ccf0 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -130,11 +130,27 @@ parts:
source: snap-src
plugin: dump
+ go:
+ plugin: nil
+ prepare: |
+ gov=$(echo "$(go version | awk '{ print $3}' | sed 's/^..//') 1.7" | awk '{if ($1 < $2) print "old";}')
+ echo "$(go version)"
+ if [ "${gov}" = "old" ]; then \
+ echo "updating to new go"; \
+ curl https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz -o go1.9.2.linux-amd64.tar.gz; \
+ tar -xvf go1.9.2.linux-amd64.tar.gz; \
+ rm -rf /usr/lib/go; \
+ mv go /usr/lib/; \
+ ln -sf ../lib/go/bin/go /usr/bin/go; \
+ fi
+
caddy:
plugin: go
go-importpath: github.com/mholt/caddy
source: https://github.com/mholt/caddy.git
source-type: git
source-commit: 53e117802fedd5915eeb32907873d8786a4b2936
+ after:
+ - go
prime:
- bin/caddy