summaryrefslogtreecommitdiffstats
path: root/docker/dev
diff options
context:
space:
mode:
authorFelix Ableitner <me@nutomic.com>2020-02-29 20:25:35 +0100
committerFelix Ableitner <me@nutomic.com>2020-02-29 20:25:35 +0100
commitee7949a0fc3a6c9889778a55c236327104782783 (patch)
tree94577a7aefba02cd0039cfb0f97361ebefb04439 /docker/dev
parentd7f49cea9a809f9c24947e7c4c941118c22a1f86 (diff)
update deploy script to pull translations from weblate
Diffstat (limited to 'docker/dev')
-rwxr-xr-xdocker/dev/deploy.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/docker/dev/deploy.sh b/docker/dev/deploy.sh
index 38ea6161..30500b5a 100755
--- a/docker/dev/deploy.sh
+++ b/docker/dev/deploy.sh
@@ -1,24 +1,27 @@
#!/bin/sh
git checkout master
+# Import translations
+wget "https://weblate.yerbamate.dev/download/lemmy/lemmy/?format=zip" -O /tmp/lemmy_l10n.zip
+unzip -j -o /tmp/lemmy_l10n.zip -d ui/translations/
+rm /tmp/lemmy_l10n.zip
+
# Creating the new tag
new_tag="$1"
-git tag $new_tag
-
third_semver=$(echo $new_tag | cut -d "." -f 3)
# Setting the version on the front end
cd ../../
-echo "export const version: string = '$(git describe --tags)';" > "ui/src/version.ts"
+echo "export const version: string = '$new_tag';" > "ui/src/version.ts"
git add "ui/src/version.ts"
# Setting the version on the backend
-echo "pub const VERSION: &str = \"$(git describe --tags)\";" > "server/src/version.rs"
+echo "pub const VERSION: &str = \"$new_tag\";" > "server/src/version.rs"
git add "server/src/version.rs"
# Setting the version for Ansible
-git describe --tags > "ansible/VERSION"
+$new_tag > "ansible/VERSION"
git add "ansible/VERSION"
-cd docker/dev
+cd docker/dev || exit
# Changing the docker-compose prod
sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml
@@ -28,6 +31,7 @@ git add ../../ansible/templates/docker-compose.yml
# The commit
git commit -m"Version $new_tag"
+git tag $new_tag
# Rebuilding docker
docker-compose build
@@ -69,5 +73,5 @@ git push origin $new_tag
git push
# Pushing to any ansible deploys
-cd ../../ansible
+cd ../../ansible || exit
ansible-playbook lemmy.yml --become