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 docker buildx build --platform linux/amd64 ../../ \
43 --tag dessalines/lemmy:$new_tag \
44 --file docker/dev/Dockerfile.m \
47 # TODO get linux/arm/v7 build working
48 # Build for Raspberry Pi / other archs too
49 docker buildx build --platform linux/amd64,linux/arm64 ../../ \
51 --tag dessalines/lemmy:$new_tag \
52 --file docker/dev/Dockerfile.m \
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