2017-07-10 22:19:53 +08:00
|
|
|
#!/bin/bash
|
2017-07-28 18:21:55 +08:00
|
|
|
|
|
|
|
# Install rice tool if not present
|
|
|
|
if ! [ -x "$(command -v rice)" ]; then
|
|
|
|
go get github.com/GeertJohan/go.rice/rice
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Clean the dist folder and build the assets
|
2017-07-10 22:19:53 +08:00
|
|
|
rm -rf assets/dist
|
|
|
|
npm run build
|
2017-07-28 18:21:55 +08:00
|
|
|
|
|
|
|
# Embed the assets using rice
|
2017-07-10 22:19:53 +08:00
|
|
|
rice embed-go
|
2017-07-18 16:06:19 +08:00
|
|
|
cd ./caddy/hugo
|
|
|
|
rice embed-go
|