7 #third_semver=$(echo $new_tag | cut -d "." -f 3)
9 # Setting the version on the front end
11 # Setting the version on the backend
12 echo "pub const VERSION: &str = \"$new_tag\";" > "lemmy_api/src/version.rs"
13 git add "lemmy_api/src/version.rs"
14 # Setting the version for Ansible
15 echo $new_tag > "ansible/VERSION"
16 git add "ansible/VERSION"
18 cd docker/prod || exit
20 # Changing various references to the Lemmy version
21 sed -i "s/dessalines\/lemmy-ui:.*/dessalines\/lemmy-ui:$new_tag/" ../dev/docker-compose.yml
22 sed -i "s/dessalines\/lemmy-ui:.*/dessalines\/lemmy-ui:$new_tag/" ../federation/docker-compose.yml
23 sed -i "s/dessalines\/lemmy-ui:.*/dessalines\/lemmy-ui:$new_tag/" ../prod/docker-compose.yml
24 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml
26 git add ../dev/docker-compose.yml
27 git add ../prod/docker-compose.yml
30 git commit -m"Version $new_tag"
33 # export COMPOSE_DOCKER_CLI_BUILD=1
34 # export DOCKER_BUILDKIT=1
37 # if [ $third_semver -eq 0 ]; then
38 # # TODO get linux/arm/v7 build working
39 # # Build for Raspberry Pi / other archs too
40 # docker buildx build --platform linux/amd64,linux/arm64 ../../ \
42 # --tag dessalines/lemmy:$new_tag \
45 # docker buildx build --platform linux/amd64 ../../ \
47 # --tag dessalines/lemmy:$new_tag \
52 git push origin $new_tag
55 # Pushing to any ansible deploys
56 # cd ../../../lemmy-ansible || exit
57 # ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass