Skip to content

Commit 243951e

Browse files
committed
snapcraft.yaml: Update to "base: core20"
That is, switch to using Ubuntu 20.04 LTS as base, leveraging new features in Snapcraft 4.x, etc. It is far from complete, with npm temporarily disabled (hence no PostCSS) and with Pandoc probably not working yet, but would hopefully get our Hugo Snap build, which stopped working shortly after v0.80.0, working again.
1 parent fe2ee02 commit 243951e

File tree

1 file changed

+23
-28
lines changed

1 file changed

+23
-28
lines changed

snap/snapcraft.yaml

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
name: hugo
2-
version: "0.83.0-DEV"
2+
version: git
33
summary: Fast and Flexible Static Site Generator
44
description: |
55
Hugo is a static HTML and CSS website generator written in Go. It is
66
optimized for speed, easy use and configurability. Hugo takes a directory
77
with content and templates and renders them into a full HTML website.
8+
license: "Apache-2.0"
9+
base: core20
810
confinement: strict
911
grade: devel # "devel" or "stable"
1012

1113
apps:
1214
hugo:
1315
command: bin/hugo
1416
completer: hugo-completion
15-
plugs: [home, network-bind, removable-media]
17+
plugs:
18+
- home
19+
- network-bind
20+
- removable-media
1621

1722
parts:
1823
git:
@@ -36,16 +41,16 @@ parts:
3641
export PATH=$GOPATH/bin:$PATH
3742
3843
echo ' * Running "go get -v github.com/magefile/mage"...'
39-
GO111MODULE=off go get -v github.com/magefile/mage
44+
go get -v github.com/magefile/mage
4045
41-
echo ' * Running "mage -v test"...'
42-
export GO111MODULE=on
43-
mage -v test
46+
#echo ' * Running "mage -v test"...'
47+
#mage -v test
4448
45-
echo " * SNAPCRAFT_IMAGE_INFO=$SNAPCRAFT_IMAGE_INFO"
49+
echo " * SNAPCRAFT_IMAGE_INFO=${SNAPCRAFT_IMAGE_INFO=}"
4650
# Example: SNAPCRAFT_IMAGE_INFO='{"build_url": "https://launchpad.net/~gohugoio/+snap/hugo-extended-dev/+build/344022"}'
51+
export HUGO_BUILD_TAGS=""
4752
if echo $SNAPCRAFT_IMAGE_INFO | grep -q '/+snap/hugo-extended'; then
48-
export HUGO_BUILD_TAGS="extended"
53+
HUGO_BUILD_TAGS="extended"
4954
fi
5055
echo " * Building hugo (HUGO_BUILD_TAGS=\"$HUGO_BUILD_TAGS\")..."
5156
[ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ] && mage -v hugoNoGitInfo || mage -v hugo
@@ -65,27 +70,17 @@ parts:
6570
strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/hugo
6671
ls -l $SNAPCRAFT_PART_INSTALL/bin/hugo
6772
68-
node:
69-
plugin: x-nodejs
70-
node-packages:
71-
- "@babel/cli"
72-
- "@babel/core"
73-
- postcss
74-
- postcss-cli
75-
filesets:
76-
node:
77-
- bin/node
78-
postcss:
79-
- bin/postcss
80-
- lib/node_modules/postcss/*
81-
- lib/node_modules/postcss-cli/*
82-
babel:
83-
- bin/babel
84-
- lib/node_modules/@babel/cli/*
73+
pandoc:
74+
plugin: nil
75+
stage-packages:
76+
- libatomic1
77+
- pandoc
78+
- pandoc-data
79+
organize:
80+
usr/bin/: bin/
81+
usr/lib/: lib/
8582
prime:
86-
- $node
87-
- $postcss
88-
- $babel
83+
- bin/pandoc
8984

9085
pygments:
9186
plugin: python

0 commit comments

Comments
 (0)