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 docker build ../../ -f Dockerfile --tag prod_lemmy:latest
41 docker tag prod_lemmy:latest dessalines/lemmy:x64-$new_tag
42 docker push dessalines/lemmy:x64-$new_tag
44 # Build for Raspberry Pi / other archs
46 # Arm currently not working
47 # docker build -t lemmy:armv7hf -f Dockerfile.armv7hf ../../
48 # docker tag lemmy:armv7hf dessalines/lemmy:armv7hf-$new_tag
49 # docker push dessalines/lemmy:armv7hf-$new_tag
52 # Only do this on major releases (IE the third semver is 0)
53 if [ $third_semver -eq 0 ]; then
54 # Registering qemu binaries
55 docker run --rm --privileged multiarch/qemu-user-static:register --reset
57 docker build -t lemmy:aarch64 -f Dockerfile.aarch64 ../../
58 docker tag lemmy:aarch64 dessalines/lemmy:arm64-$new_tag
59 docker push dessalines/lemmy:arm64-$new_tag
62 # Creating the manifest for the multi-arch build
63 if [ $third_semver -eq 0 ]; then
64 docker manifest create dessalines/lemmy:$new_tag \
65 dessalines/lemmy:x64-$new_tag \
66 dessalines/lemmy:arm64-$new_tag
68 docker manifest create dessalines/lemmy:$new_tag \
69 dessalines/lemmy:x64-$new_tag
72 docker manifest push dessalines/lemmy:$new_tag
75 git push origin $new_tag
78 # Pushing to any ansible deploys
79 cd ../../../lemmy-ansible || exit
80 ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass