chore: update travis scripts
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
7992c8bf50
commit
6403bbdc57
10
.travis.yml
10
.travis.yml
@ -12,17 +12,17 @@ env:
|
||||
- USE_DOCKER="true"
|
||||
stages:
|
||||
- lint
|
||||
- test
|
||||
- build
|
||||
- release
|
||||
cache:
|
||||
directories:
|
||||
- lib/rice-box.go
|
||||
- http/rice-box.go
|
||||
jobs:
|
||||
include:
|
||||
- stage: lint
|
||||
script: "./build/run_gometalinter.sh"
|
||||
- stage: test
|
||||
script: "./build/build_all.sh"
|
||||
script: ./build/run_gometalinter.sh
|
||||
- stage: build
|
||||
script: ./build/build_all.sh
|
||||
deploy:
|
||||
provider: script
|
||||
skip_cleanup: true
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)/../cli
|
||||
cd $(dirname $0)/..
|
||||
|
||||
go get -v ./...
|
||||
|
||||
if [ "$COMMIT_SHA" != "" ]; then
|
||||
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
|
||||
|
||||
echo "Build CLI"
|
||||
@ -16,5 +16,5 @@ go build -a -o filebrowser
|
||||
|
||||
if [ "$COMMIT_SHA" != "" ]; then
|
||||
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
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
if [ -d lib/"rice-box.go" ]; then
|
||||
rm -rf lib/rice-box.go
|
||||
if [ -d http/"rice-box.go" ]; then
|
||||
rm -rf http/rice-box.go
|
||||
fi
|
||||
|
||||
if [ "$USE_DOCKER" != "" ]; then
|
||||
@ -36,8 +36,8 @@ if [ "$USE_DOCKER" != "" ]; then
|
||||
for d in "dist/" "node_modules/"; do
|
||||
docker cp filebrowser-tmp://src/frontend/$d frontend
|
||||
done
|
||||
docker cp filebrowser-tmp://src/cli/filebrowser ./filebrowser
|
||||
docker cp filebrowser-tmp://src/lib/rice-box.go ./lib/rice-box.go
|
||||
docker cp filebrowser-tmp://src/filebrowser ./filebrowser
|
||||
docker cp filebrowser-tmp://src/http/rice-box.go ./http/rice-box.go
|
||||
else
|
||||
echo "BUILD FAILED!"
|
||||
fi
|
||||
|
||||
@ -19,5 +19,5 @@ if ! [ -x "$(command -v rice)" ]; then
|
||||
fi
|
||||
|
||||
# Embed the assets using rice
|
||||
cd lib
|
||||
cd http
|
||||
rice embed-go
|
||||
|
||||
Loading…
Reference in New Issue
Block a user