2018-06-06 20:02:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
2018-08-21 21:42:03 +00:00
|
|
|
if [ -d lib/"rice-box.go" ]; then
|
|
|
|
rm -rf lib/rice-box.go
|
2018-08-06 04:15:57 +00:00
|
|
|
fi
|
|
|
|
|
2018-06-06 20:02:00 +00:00
|
|
|
if [ "$USE_DOCKER" != "" ]; then
|
|
|
|
if [ -d "frontend/dist" ]; then
|
|
|
|
rm -rf frontend/dist
|
|
|
|
fi;
|
2018-04-18 15:27:28 +00:00
|
|
|
|
2018-08-20 09:41:06 +00:00
|
|
|
if [ "$(command -v git)" != "" ]; then
|
|
|
|
COMMIT_SHA="$(git rev-parse HEAD | cut -c1-8)"
|
|
|
|
else
|
|
|
|
COMMIT_SHA="untracked"
|
|
|
|
fi
|
|
|
|
|
2019-01-02 02:13:53 +00:00
|
|
|
$(command -v winpty) docker run --rm -it \
|
2018-06-06 20:02:00 +00:00
|
|
|
-v /$(pwd):/src:z \
|
2018-12-25 23:48:43 +00:00
|
|
|
-w //src \
|
2018-08-20 09:41:06 +00:00
|
|
|
-e COMMIT_SHA=$COMMIT_SHA \
|
2018-06-06 20:02:00 +00:00
|
|
|
filebrowser/dev \
|
|
|
|
sh -c "\
|
|
|
|
cd build && \
|
2018-12-28 23:39:46 +00:00
|
|
|
dos2unix build_assets.sh && \
|
|
|
|
dos2unix build.sh && \
|
2018-06-06 20:02:00 +00:00
|
|
|
./build_assets.sh && \
|
2019-01-02 02:23:16 +00:00
|
|
|
./build.sh &&
|
|
|
|
mv ../cli/filebrowser ../ \
|
2018-06-06 20:02:00 +00:00
|
|
|
"
|
|
|
|
else
|
2018-08-20 09:41:06 +00:00
|
|
|
set -e
|
2018-06-06 20:02:00 +00:00
|
|
|
./build/build_assets.sh
|
|
|
|
./build/build.sh
|
|
|
|
fi
|