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\";" > "src/version.rs"
13 git add "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 the docker-compose prod
21 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml
22 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../../ansible/templates/docker-compose.yml
23 sed -i "s/dessalines\/lemmy:v.*/dessalines\/lemmy:$new_tag/" ../travis/docker_push.sh
24 git add ../prod/docker-compose.yml
25 git add ../../ansible/templates/docker-compose.yml
26 git add ../travis/docker_push.sh
29 git commit -m"Version $new_tag"
32 # Now doing the building on travis, but leave this in for when you need to do an arm build
34 # export COMPOSE_DOCKER_CLI_BUILD=1
35 # export DOCKER_BUILDKIT=1
38 # if [ $third_semver -eq 0 ]; then
39 # # TODO get linux/arm/v7 build working
40 # # Build for Raspberry Pi / other archs too
41 # docker buildx build --platform linux/amd64,linux/arm64 ../../ \
43 # --tag dessalines/lemmy:$new_tag \
46 # docker buildx build --platform linux/amd64 ../../ \
48 # --tag dessalines/lemmy:$new_tag \
53 git push origin $new_tag
56 # Pushing to any ansible deploys
57 # cd ../../../lemmy-ansible || exit
58 # ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass