Skip to content

Commit

Permalink
Add the release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Nov 28, 2023
1 parent 52d0081 commit 2dab2b5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions release/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/sh

set -e

if [ "$#" -ne 2 ]; then
echo "Bad numbers of arguments"
echo "This script is to prepare a new release."
echo "release.sh YYYY-MM-DD VERSION"
echo "Be careful, original files will be updated"
exit 1
fi

DATE="$1"
VERSION="$2"

echo "## Updating files to be able to release a new version of Lizmap ####"

echo "Date : "$1
echo "Version : "$2

echo "README.md"
sed -i "1 s/[a-z.0-9-]\+$/$2/" README.md

echo "lizmap/project.xml"
sed -i "s@<version date=\"[0-9-]\+\">[a-z.0-9-]\+</version>@<version date=\"$1\">$2</version>@g" lizmap/project.xml

for file in lizmap/modules/**/module.xml
do
sed -i "s@<version date=\"[0-9-]\+\">[a-z.0-9-]\+</version>@<version date=\"$1\">$2</version>@g" "$file"
echo "$file"
done

git add README.md
git add lizmap/project.xml
git add lizmap/modules/*/module.xml
git commit -m "Bump to version $2"

0 comments on commit 2dab2b5

Please sign in to comment.