Use dev branch for updates until first release

Add seq to force a cloned repository to dev branch, losing all unstaged changes
This commit is contained in:
2019-11-13 11:59:20 +01:00
parent e8b475d9f7
commit bc12312101

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
toolName="pixelfed" toolName="pixelfed"
toolTag="v0.10.6" toolTag="dev"
toolDeps="composer jpegoptim php7.3-bcmath" toolDeps="composer jpegoptim php7.3-bcmath"
toolPath="/var/www/pixelfed" toolPath="/var/www/pixelfed"
@@ -207,9 +207,28 @@ step_22() {
exe php artisan user:create exe php artisan user:create
} }
step_24_info() { echo "Upgrade \"${toolPath}\" to supported tag $toolTag"; } step_24_info() { echo "Checkout to dev branch. Losing local changes!"; }
step_24_alias() { ALIAS="upgrade"; } step_24_alias() { ALIAS="forcedev"; }
step_24() { step_24() {
read -p "Are you sure: y/n(default)? " answer
case $answer in
[yY])
;;
*)
return 1
;;
esac
cd $toolPath
exe git fetch --all
exe git reset --hard origin/dev
exe git pull origin dev
exe git checkout dev
}
step_100_info() { echo "Upgrade \"${toolPath}\" to supported tag $toolTag"; }
step_100_alias() { ALIAS="upgrade"; }
step_100() {
cd $toolPath cd $toolPath
exe git pull exe git pull
saveReturn $? saveReturn $?
@@ -219,9 +238,9 @@ step_24() {
endReturn endReturn
} }
step_25_info() { echo "Recommended post update procedure"; } step_101_info() { echo "Recommended post update procedure"; }
step_25_alias() { ALIAS="postupdate"; } step_101_alias() { ALIAS="postupdate"; }
step_25() { step_101() {
cd $toolPath cd $toolPath
exe composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader exe composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
exe php artisan config:cache exe php artisan config:cache