mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-09 11:42:57 +00:00

Former-commit-id: 8f25251975c4e8a24d8cd7af1a9ab915010cb2ec [formerly 22583d38eff231d75e6fa1bb0a3f30f19201ebe2] [formerly f96b729dcf040693463591f90c602b030c576c1a [formerly 43ab4fa3de52e96c9eaaf125cadb1faf64772592]] Former-commit-id: 1b1a4b9be3b365faf0e18215fb2b5723b644a66f [formerly 6ce724f373ec2ad6738c61589a075ff9de0ed64e] Former-commit-id: 750ca0440b7fb606e53fc043255fd2b0e0327a17
40 lines
1.0 KiB
Bash
Executable File
40 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
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/
|
|
sed -i 's/package filebrowser/package assets/g' assets/rice-box.go
|
|
git checkout -b update-rice-box origin/master
|
|
git config --local user.name "Filebrowser Bot"
|
|
git config --local user.email "FilebrowserBot@users.noreply.github.com"
|
|
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
|
|
|