7 third_semver=$(echo $new_tag | cut -d "." -f 3)
10 CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
13 # The ansible and docker installs should only update for non release-candidates
14 # IE, when the third semver is a number, not '2-rc'
15 if [ ! -z "${third_semver##*[!0-9]*}" ]; then
17 sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" docker-compose.yml
18 sed -i "s/dessalines\/lemmy-ui:.*/dessalines\/lemmy-ui:$new_tag/" docker-compose.yml
19 sed -i "s/dessalines\/lemmy-ui:.*/dessalines\/lemmy-ui:$new_tag/" federation/docker-compose.yml
20 git add docker-compose.yml
21 git add federation/docker-compose.yml
24 # Setting the version for Ansible
25 pushd ../lemmy-ansible
26 echo $new_tag > "VERSION"
28 git commit -m"Updating VERSION"
30 git push origin $new_tag
35 # Update crate versions
36 old_tag=$(grep version Cargo.toml | head -1 | cut -d'"' -f 2)
37 sed -i "s/{ version = \"=$old_tag\", path/{ version = \"=$new_tag\", path/g" Cargo.toml
38 sed -i "s/version = \"$old_tag\"/version = \"$new_tag\"/g" Cargo.toml
43 # Update the submodules
44 git submodule update --remote
45 git add crates/utils/translations
48 git commit -m"Version $new_tag"
51 # export COMPOSE_DOCKER_CLI_BUILD=1
52 # export DOCKER_BUILDKIT=1
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