drop package.json, use yarn instad of npm, add build_in_docker.sh
Former-commit-id: 1f1ce1a5350eb1d4d12dc3b90bae20d6df6048f9 [formerly fae0cae6f369574aab49ab952e1aa681c97f7067] [formerly 6f8245ec50d0d2485a263e5877a6a353837b1197 [formerly f91ee24858116d7a313bdf8d57a994abbbc3f2a8]] Former-commit-id: b9bb3ad6a460de55851943bbbc62aee74e32028c [formerly 049f6c239d7a936d70493e68f23838c0ec11af88] Former-commit-id: 81f69427472bbeb3f82e6bd2c3a114e2c5fb47d7
This commit is contained in:
21
build.sh
21
build.sh
@@ -1,14 +1,25 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
# Clean the dist folder and build the assets
|
||||
if [ ! -d "frontend" ]; then
|
||||
git clone -b master https://github.com/filebrowser/frontend
|
||||
fi;
|
||||
cd frontend
|
||||
if [ -d "dist" ]; then
|
||||
rm -rf dist/*
|
||||
fi;
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
cd ..
|
||||
|
||||
# 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 node_modules
|
||||
npm install
|
||||
|
||||
# Embed the assets using rice
|
||||
rice embed-go
|
||||
|
||||
Reference in New Issue
Block a user