|
12 | 12 |
|
13 | 13 | main() { |
14 | 14 |
|
15 | | - DART_SASS_VERSION=1.89.2 |
16 | | - HUGO_VERSION=0.148.1 |
17 | | - |
18 | | - export TZ=Europe/Oslo |
19 | | - |
20 | | - # Install Dart Sass |
21 | | - echo "Installing Dart Sass v${DART_SASS_VERSION}..." |
22 | | - curl -LJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" |
23 | | - tar -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" |
24 | | - cp -r dart-sass/ /opt/buildhome |
25 | | - rm -rf dart-sass* |
26 | | - |
27 | | - |
28 | | - # Install Hugo |
29 | | - echo "Installing Hugo v${HUGO_VERSION}..." |
30 | | - curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}-linux-amd64.tar.gz |
31 | | - tar -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" |
32 | | - cp hugo /opt/buildhome |
33 | | - rm LICENSE README.md hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz |
34 | | - |
35 | | - # Set PATH |
36 | | - echo "Setting the PATH environment variable..." |
37 | | - export PATH=/opt/buildhome:/opt/buildhome/dart-sass:$PATH |
38 | | - |
39 | | - # Verify installed versions |
40 | | - echo "Verifying installations..." |
41 | | - echo Dart Sass: "$(sass --version)" |
42 | | - echo Go: "$(go version)" |
43 | | - echo Hugo: "$(hugo version)" |
44 | | - echo Node.js: "$(node --version)" |
45 | | - |
46 | | - # https://gohugo.io/methods/page/gitinfo/#hosting-considerations |
47 | | - git fetch --recurse-submodules --unshallow |
48 | | - |
49 | | - # https://github.com/gohugoio/hugo/issues/9810 |
50 | | - git config core.quotepath false |
51 | | - |
52 | | - # Build the site. |
53 | | - hugo --gc --minify |
| 15 | + DART_SASS_VERSION=1.89.2 |
| 16 | + HUGO_VERSION=0.148.0 |
| 17 | + |
| 18 | + export TZ=Europe/Oslo |
| 19 | + |
| 20 | + # Install Dart Sass |
| 21 | + echo "Installing Dart Sass v${DART_SASS_VERSION}..." |
| 22 | + curl -LJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" |
| 23 | + tar -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" |
| 24 | + cp -r dart-sass/ /opt/buildhome |
| 25 | + rm -rf dart-sass* |
| 26 | + |
| 27 | + # Install Hugo |
| 28 | + echo "Installing Hugo v${HUGO_VERSION}..." |
| 29 | + curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz |
| 30 | + tar -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" |
| 31 | + cp hugo /opt/buildhome |
| 32 | + rm LICENSE README.md hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz |
| 33 | + |
| 34 | + # Set PATH |
| 35 | + echo "Setting the PATH environment variable..." |
| 36 | + export PATH=/opt/buildhome:/opt/buildhome/dart-sass:$PATH |
| 37 | + |
| 38 | + # Verify installed versions |
| 39 | + echo "Verifying installations..." |
| 40 | + echo Dart Sass: "$(sass --version)" |
| 41 | + echo Go: "$(go version)" |
| 42 | + echo Hugo: "$(hugo version)" |
| 43 | + echo Node.js: "$(node --version)" |
| 44 | + |
| 45 | + # https://gohugo.io/methods/page/gitinfo/#hosting-considerations |
| 46 | + git fetch --recurse-submodules --unshallow |
| 47 | + |
| 48 | + # https://github.com/gohugoio/hugo/issues/9810 |
| 49 | + git config core.quotepath false |
| 50 | + |
| 51 | + # Build the site. |
| 52 | + hugo --gc --minify |
54 | 53 |
|
55 | 54 | } |
56 | 55 |
|
|
0 commit comments