Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/snap
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2018-10-11 17:56:53 +0300
committerAnthony Fok <foka@debian.org>2018-10-12 06:10:38 +0300
commitd14420539ac04d31dde2252eee66d7e4c7749780 (patch)
tree7baa8e95ea551cb3481fd2df1a0844dee6c87dca /snap
parent3d4a9882bfc81215fb4f9eba8859324958747d4a (diff)
snap: Set "extended" tag based on build_url on Launchpad
Read build_url from $SNAPCRAFT_IMAGE_INFO to determine whether to add the "extended" build tag or not. This allows us to do away with the extended-snap-master and extended-snap-stable branches.
Diffstat (limited to 'snap')
-rw-r--r--snap/snapcraft.yaml7
1 files changed, 6 insertions, 1 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index c7b2a8a60..6967b9fc2 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -42,7 +42,12 @@ parts:
export GO111MODULE=on
mage -v test
- echo " * Building hugo (build tag: none)..."
+ echo " * SNAPCRAFT_IMAGE_INFO=$SNAPCRAFT_IMAGE_INFO"
+ # Example: SNAPCRAFT_IMAGE_INFO='{"build_url": "https://launchpad.net/~gohugoio/+snap/hugo-extended-dev/+build/344022"}'
+ if echo $SNAPCRAFT_IMAGE_INFO | grep -q '/+snap/hugo-extended'; then
+ export HUGO_BUILD_TAGS="extended"
+ fi
+ echo " * Building hugo (HUGO_BUILD_TAGS=\"$HUGO_BUILD_TAGS\")..."
[ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ] && mage -v hugoNoGitInfo || mage -v hugo
./hugo version
ldd hugo || :