Attempt workaround for netlify CGO issues
https://github.com/netlify/build-image/issues/183#issuecomment-419199649
This commit is contained in:
parent
cddfa935fa
commit
0e16ed30a8
2 changed files with 18 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
[build]
|
[build]
|
||||||
publish = "public/"
|
publish = "public/"
|
||||||
command = "./scripts/release.sh"
|
command = "./scripts/netlify.sh"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.47.1"
|
HUGO_VERSION = "0.47.1"
|
||||||
|
|
17
scripts/netlify.sh
Executable file
17
scripts/netlify.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# https://github.com/netlify/build-image/issues/183#issuecomment-419199649
|
||||||
|
|
||||||
|
HUGO_FLAVOUR="hugo_extended"
|
||||||
|
|
||||||
|
rm -rf *.deb
|
||||||
|
wget --no-clobber http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb || exit 1
|
||||||
|
wget --no-clobber https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_FLAVOUR}_${HUGO_VERSION}_Linux-64bit.deb || exit 1
|
||||||
|
grep "hugo=" ~/.bashrc || echo "alias hugo='LD_LIBRARY_PATH=$(pwd)/tmp/usr/lib/x86_64-linux-gnu $(pwd)/tmp/usr/local/bin/hugo'" >> ~/.bashrc
|
||||||
|
find -name '*.deb' -exec dpkg -x {} $(pwd)/tmp \;
|
||||||
|
rm -rf *.deb
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$(pwd)/tmp/usr/lib/x86_64-linux-gnu
|
||||||
|
export PATH=$(pwd)/tmp/usr/local/bin:$PATH
|
||||||
|
|
||||||
|
./scripts/release.sh
|
Loading…
Reference in a new issue