2017-10-30 23:24:06 +08:00
|
|
|
#!/bin/bash
|
2018-01-05 18:15:26 +08:00
|
|
|
set -e
|
2017-10-30 23:24:06 +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
|
|
|
|
rm -rf assets/dist
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
# Embed the assets using rice
|
|
|
|
rice embed-go
|