mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
update ricebox in caddy/assets
Former-commit-id: af8d9982d961f4c8e5a301dc0eeb1dc790f35231 [formerly 6f678bfadf1e1db8c8dc5e368087a23a3dba8b65] [formerly 3d06b4d8d6b2ffe209f10b9ae4ce30955839e721 [formerly 6f7fded3f1
]]
Former-commit-id: 4016e6b9b12d5f945c67fd0960a3460cd1fbfda1 [formerly 1ead636502f6b0991e1b18f3de5889546cedfa24]
Former-commit-id: 03bb7d11a2062ca3fe4ffd5d3efc702e4652c260
This commit is contained in:
parent
e0c91bb747
commit
4ace991b8a
@ -44,6 +44,7 @@ jobs:
|
||||
- ./build/docker_login.sh
|
||||
- docker run --rm -itv $(pwd):$WDIR -v /var/run/docker.sock:/var/run/docker.sock filebrowser/dev goreleaser
|
||||
- docker logout
|
||||
- ./build/push_ricebox.sh
|
||||
if: tag IS present
|
||||
deploy:
|
||||
provider: releases
|
||||
|
34
build/push_ricebox.sh
Executable file
34
build/push_ricebox.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
COMMIT_SHA="$(git rev-parse --verify HEAD | cut -c1-8)"
|
||||
|
||||
eval `ssh-agent -s`
|
||||
openssl aes-256-cbc -K $encrypted_9ca81b5594f5_key -iv $encrypted_9ca81b5594f5_iv -in ./deploy_key.enc -d | ssh-add -
|
||||
|
||||
git clone git@github.com:filebrowser/caddy caddy
|
||||
cd caddy
|
||||
cp ../../rice-box.go assets/
|
||||
git checkout -b update-rice-box origin/master
|
||||
git commit -am "update rice-box $COMMIT_SHA"
|
||||
|
||||
if [ $(git tag | grep "$TRAVIS_TAG" | wc -l) -ne 0 ]; then
|
||||
git tag -d "$TRAVIS_TAG"
|
||||
fi
|
||||
|
||||
git tag "$TRAVIS_TAG"
|
||||
|
||||
if [ "$(git ls-remote --heads origin update-rice-box)" != "" ]; then
|
||||
git push -u origin update-rice-box
|
||||
else
|
||||
git push origin +update-rice-box
|
||||
fi
|
||||
|
||||
if [ "$(git ls-remote --heads origin update-rice-box)" != "" ]; then
|
||||
git push origin "$TRAVIS_TAG"
|
||||
else
|
||||
git push origin :"$TRAVIS_TAG"
|
||||
git push origin "$TRAVIS_TAG"
|
||||
fi
|
||||
|
@ -21,8 +21,7 @@ echo "> Checking matching $semver in frontend submodule"
|
||||
cd frontend
|
||||
git fetch --all
|
||||
|
||||
trash=$(git tag | grep "$semver")
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ $(git tag | grep "$semver" | wc -l) -eq 0 ]; then
|
||||
echo "Tag $semver does not exist in submodule 'frontend'. Tag it and run this script again."
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user