File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ if [ " $# " -ne 2 ]; then
6
+ echo " Bad numbers of arguments"
7
+ echo " This script is to prepare a new release."
8
+ echo " release.sh YYYY-MM-DD VERSION"
9
+ echo " Be careful, original files will be updated"
10
+ exit 1
11
+ fi
12
+
13
+ DATE=" $1 "
14
+ VERSION=" $2 "
15
+
16
+ echo " ## Updating files to be able to release a new version of Lizmap ####"
17
+
18
+ echo " Date : " $1
19
+ echo " Version : " $2
20
+
21
+ echo " README.md"
22
+ sed -i " 1 s/[a-z.0-9-]\+$/$2 /" README.md
23
+
24
+ echo " lizmap/project.xml"
25
+ sed -i " s@<version date=\" [0-9-]\+\" >[a-z.0-9-]\+</version>@<version date=\" $1 \" >$2 </version>@g" lizmap/project.xml
26
+
27
+ for file in lizmap/modules/** /module.xml
28
+ do
29
+ sed -i " s@<version date=\" [0-9-]\+\" >[a-z.0-9-]\+</version>@<version date=\" $1 \" >$2 </version>@g" " $file "
30
+ echo " $file "
31
+ done
32
+
33
+ git add README.md
34
+ git add lizmap/project.xml
35
+ git add lizmap/modules/* /module.xml
36
+ git commit -m " Bump to version $2 "
You can’t perform that action at this time.
0 commit comments