7 git merge weblate/master
11 third_semver=$(echo $new_tag | cut -d "." -f 3)
13 # Setting the version on the front end
15 echo "export const version: string = '$new_tag';" > "ui/src/version.ts"
16 git add "ui/src/version.ts"
17 # Setting the version on the backend
18 echo "pub const VERSION: &str = \"$new_tag\";" > "server/src/version.rs"
19 git add "server/src/version.rs"
20 # Setting the version for Ansible
21 echo $new_tag > "ansible/VERSION"
22 git add "ansible/VERSION"
24 cd docker/prod || exit
26 # Changing the docker-compose prod
27 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml
28 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../../ansible/templates/docker-compose.yml
29 git add ../prod/docker-compose.yml
30 git add ../../ansible/templates/docker-compose.yml
33 git commit -m"Version $new_tag"
36 export COMPOSE_DOCKER_CLI_BUILD=1
37 export DOCKER_BUILDKIT=1
40 if [ $third_semver -eq 0 ]; then
41 # TODO get linux/arm/v7 build working
42 # Build for Raspberry Pi / other archs too
43 docker buildx build --platform linux/amd64,linux/arm64 ../../ \
45 --tag dessalines/lemmy:$new_tag \
48 docker buildx build --platform linux/amd64 ../../ \
50 --tag dessalines/lemmy:$new_tag \
55 git push origin $new_tag
58 # Pushing to any ansible deploys
59 cd ../../../lemmy-ansible || exit
60 ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass