7 third_semver=$(echo $new_tag | cut -d "." -f 3)
9 # Setting the version on the backend
11 echo "pub const VERSION: &str = \"$new_tag\";" > "crates/utils/src/version.rs"
12 git add "crates/utils/src/version.rs"
15 # The ansible and docker installs should only update for non release-candidates
16 # IE, when the third semver is a number, not '2-rc'
17 if [ ! -z "${third_semver##*[!0-9]*}" ]; then
18 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml
19 sed -i "s/dessalines\/lemmy-ui:.*/dessalines\/lemmy-ui:$new_tag/" ../prod/docker-compose.yml
20 git add ../prod/docker-compose.yml
22 # Setting the version for Ansible
24 echo $new_tag > "ansible/VERSION"
25 git add "ansible/VERSION"
30 git commit -m"Version $new_tag"
33 # export COMPOSE_DOCKER_CLI_BUILD=1
34 # export DOCKER_BUILDKIT=1
37 git push origin $new_tag
40 # Pushing to any ansible deploys
41 # cd ../../../lemmy-ansible || exit
42 # ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass