Files
EasyDrop/Script/Bump_Version.sh
2023-06-24 23:34:13 +00:00

24 lines
749 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Checking if correct number of arguments are provided
if [ "$#" -ne 2 ]; then
echo "Required CLI args missing: [old_version, new_version]"
exit 1
fi
# Assigning command line arguments to variables
old_version="$1"
new_version="$2"
old_version_alt=${old_version//-/}
new_version_alt=${new_version//-/}
# Replacing old_version with new_version in README.md
sed -i "s/version-$old_version_alt-orange/version-$new_version_alt-orange/g" README.md
sed -i "s/<version>$old_version/<version>$new_version/g" pom.xml
sed -i "s/easydrop-$old_version.jar/easydrop-$new_version.jar/g" Dockerfile
sed -i "s/image: easydrop:$old_version/image: easydrop:$new_version/g" docker-compose.yml
echo "Version number updated successfully"