chore: update travis scripts

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2018-12-28 20:09:00 +00:00
parent 7992c8bf50
commit 6403bbdc57
4 changed files with 13 additions and 13 deletions

View File

@ -12,17 +12,17 @@ env:
- USE_DOCKER="true" - USE_DOCKER="true"
stages: stages:
- lint - lint
- test - build
- release - release
cache: cache:
directories: directories:
- lib/rice-box.go - http/rice-box.go
jobs: jobs:
include: include:
- stage: lint - stage: lint
script: "./build/run_gometalinter.sh" script: ./build/run_gometalinter.sh
- stage: test - stage: build
script: "./build/build_all.sh" script: ./build/build_all.sh
deploy: deploy:
provider: script provider: script
skip_cleanup: true skip_cleanup: true

View File

@ -2,13 +2,13 @@
set -e set -e
cd $(dirname $0)/../cli cd $(dirname $0)/..
go get -v ./... go get -v ./...
if [ "$COMMIT_SHA" != "" ]; then if [ "$COMMIT_SHA" != "" ]; then
echo "Set version to ($COMMIT_SHA)" echo "Set version to ($COMMIT_SHA)"
sed -i.bak "s|(untracked)|($COMMIT_SHA)|g" ../lib/filebrowser.go sed -i.bak "s|(untracked)|($COMMIT_SHA)|g" ../filebrowser.go
fi fi
echo "Build CLI" echo "Build CLI"
@ -16,5 +16,5 @@ go build -a -o filebrowser
if [ "$COMMIT_SHA" != "" ]; then if [ "$COMMIT_SHA" != "" ]; then
echo "Reset version to (untracked)" echo "Reset version to (untracked)"
sed -i "s|($COMMIT_SHA)|(untracked)|g" ../lib/filebrowser.go sed -i "s|($COMMIT_SHA)|(untracked)|g" ../filebrowser.go
fi fi

View File

@ -2,8 +2,8 @@
cd $(dirname $0)/.. cd $(dirname $0)/..
if [ -d lib/"rice-box.go" ]; then if [ -d http/"rice-box.go" ]; then
rm -rf lib/rice-box.go rm -rf http/rice-box.go
fi fi
if [ "$USE_DOCKER" != "" ]; then if [ "$USE_DOCKER" != "" ]; then
@ -36,8 +36,8 @@ if [ "$USE_DOCKER" != "" ]; then
for d in "dist/" "node_modules/"; do for d in "dist/" "node_modules/"; do
docker cp filebrowser-tmp://src/frontend/$d frontend docker cp filebrowser-tmp://src/frontend/$d frontend
done done
docker cp filebrowser-tmp://src/cli/filebrowser ./filebrowser docker cp filebrowser-tmp://src/filebrowser ./filebrowser
docker cp filebrowser-tmp://src/lib/rice-box.go ./lib/rice-box.go docker cp filebrowser-tmp://src/http/rice-box.go ./http/rice-box.go
else else
echo "BUILD FAILED!" echo "BUILD FAILED!"
fi fi

View File

@ -19,5 +19,5 @@ if ! [ -x "$(command -v rice)" ]; then
fi fi
# Embed the assets using rice # Embed the assets using rice
cd lib cd http
rice embed-go rice embed-go