Skip to content

Commit 4fd7f32

Browse files
authored
snap: Update Node.js to 22.x
1 parent c3d435a commit 4fd7f32

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

snap/snapcraft.yaml

+7-10
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ license: "Apache-2.0"
2929
source-code: https://github.com/gohugoio/hugo.git
3030
website: https://gohugo.io/
3131

32-
package-repositories:
33-
- type: apt
34-
components: [main]
35-
suites: [focal]
36-
key-id: 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280
37-
url: https://deb.nodesource.com/node_16.x
38-
3932
plugs:
4033
etc-gitconfig:
4134
interface: system-files
@@ -88,6 +81,7 @@ environment:
8881
# rst2html: PYTHONHOME and SNAP
8982
# asciidoctor: RUBYLIB
9083
HUGO_SECURITY_EXEC_OSENV: (?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|GIT_EXEC_PATH|LD_LIBRARY_PATH|npm_config_(cache|init_module|userconfig)|pandoc_datadir|PYTHONHOME|SNAP|RUBYLIB)$
84+
9185
apps:
9286
hugo:
9387
command: bin/hugo
@@ -145,7 +139,7 @@ parts:
145139
146140
HUGO_BUILD_TAGS="extended"
147141
echo " * Building hugo (HUGO_BUILD_TAGS=\"$HUGO_BUILD_TAGS\")..."
148-
go build -v -ldflags "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=snap:$(git describe --tags --always --match 'v[0-9]*' | sed 's/^v//; s/-/+git/; s/-g/./')" -tags "$HUGO_BUILD_TAGS"
142+
go build -v -ldflags "-s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=snap:$(git describe --tags --always --match 'v[0-9]*' | sed 's/^v//; s/-/+git/; s/-g/./')" -tags "$HUGO_BUILD_TAGS"
149143
./hugo version
150144
ldd hugo || :
151145
@@ -199,8 +193,11 @@ parts:
199193
200194
node:
201195
plugin: nil
202-
stage-packages:
203-
- nodejs
196+
stage-snaps:
197+
- node/22/stable
198+
organize:
199+
"LICENSE": "LICENSE_NODE" # rename to prevent conflict with Go snap
200+
"README.md": "README_NODE.md" # rename to prevent conflict with Go snap
204201

205202
pandoc:
206203
plugin: nil

0 commit comments

Comments
 (0)