diff --git a/scripts/upgrade b/scripts/upgrade index 996076f..69cf706 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,10 +92,11 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 pushd $final_path - git fetch - #git checkout master - git reset --hard --quiet $version_commit + currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD) git pull + latestVersion=$(git describe --tags --abbrev=0) + git checkout $latestVersion + for i in `git rev-list --reverse --abbrev-commit $currentVersion..HEAD` ; do file=./config/migrate-scripts/migrate-db-$i.sh ; [ -f $file ] && $file ; done ynh_exec_warn_less shards update && shards install ynh_exec_warn_less crystal build $final_path/src/invidious.cr --release popd