11 third_semver=$(echo $new_tag | cut -d "." -f 3)
13 # Setting the version on the front end
15 # Setting the version on the backend
16 echo "pub const VERSION: &str = \"$new_tag\";" > "src/version.rs"
17 git add "src/version.rs"
18 # Setting the version for Ansible
19 echo $new_tag > "ansible/VERSION"
20 git add "ansible/VERSION"
22 cd docker/prod || exit
24 # Changing the docker-compose prod
25 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml
26 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../../ansible/templates/docker-compose.yml
27 sed -i "s/dessalines\/lemmy:v.*/dessalines\/lemmy:$new_tag/" ../travis/docker_push.sh
28 git add ../prod/docker-compose.yml
29 git add ../../ansible/templates/docker-compose.yml
30 git add ../travis/docker_push.sh
33 git commit -m"Version $new_tag"
36 # Now doing the building on travis, but leave this in for when you need to do an arm build
38 # export COMPOSE_DOCKER_CLI_BUILD=1
39 # export DOCKER_BUILDKIT=1
42 # if [ $third_semver -eq 0 ]; then
43 # # TODO get linux/arm/v7 build working
44 # # Build for Raspberry Pi / other archs too
45 # docker buildx build --platform linux/amd64,linux/arm64 ../../ \
47 # --tag dessalines/lemmy:$new_tag \
50 # docker buildx build --platform linux/amd64 ../../ \
52 # --tag dessalines/lemmy:$new_tag \
57 git push origin $new_tag
60 # Pushing to any ansible deploys
61 # cd ../../../lemmy-ansible || exit
62 # ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass