6 git merge weblate/master
10 third_semver=$(echo $new_tag | cut -d "." -f 3)
12 # Setting the version on the front end
14 echo "export const version: string = '$new_tag';" > "ui/src/version.ts"
15 git add "ui/src/version.ts"
16 # Setting the version on the backend
17 echo "pub const VERSION: &str = \"$new_tag\";" > "server/src/version.rs"
18 git add "server/src/version.rs"
19 # Setting the version for Ansible
20 echo $new_tag > "ansible/VERSION"
21 git add "ansible/VERSION"
23 cd docker/prod || exit
25 # Changing the docker-compose prod
26 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml
27 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../../ansible/templates/docker-compose.yml
28 git add ../prod/docker-compose.yml
29 git add ../../ansible/templates/docker-compose.yml
32 git commit -m"Version $new_tag"
37 docker tag dev_lemmy:latest dessalines/lemmy:x64-$new_tag
38 docker push dessalines/lemmy:x64-$new_tag
40 # Build for Raspberry Pi / other archs
42 # Arm currently not working
43 # docker build -t lemmy:armv7hf -f Dockerfile.armv7hf ../../
44 # docker tag lemmy:armv7hf dessalines/lemmy:armv7hf-$new_tag
45 # docker push dessalines/lemmy:armv7hf-$new_tag
48 # Only do this on major releases (IE the third semver is 0)
49 if [ $third_semver -eq 0 ]; then
50 # Registering qemu binaries
51 docker run --rm --privileged multiarch/qemu-user-static:register --reset
53 docker build -t lemmy:aarch64 -f Dockerfile.aarch64 ../../
54 docker tag lemmy:aarch64 dessalines/lemmy:arm64-$new_tag
55 docker push dessalines/lemmy:arm64-$new_tag
58 # Creating the manifest for the multi-arch build
59 if [ $third_semver -eq 0 ]; then
60 docker manifest create dessalines/lemmy:$new_tag \
61 dessalines/lemmy:x64-$new_tag \
62 dessalines/lemmy:arm64-$new_tag
64 docker manifest create dessalines/lemmy:$new_tag \
65 dessalines/lemmy:x64-$new_tag
68 docker manifest push dessalines/lemmy:$new_tag
71 git push origin $new_tag
74 # Pushing to any ansible deploys
75 cd ../../../lemmy-ansible || exit
76 ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass