-
Notifications
You must be signed in to change notification settings - Fork 21
/
version_updater.sh
executable file
·54 lines (46 loc) · 1.79 KB
/
version_updater.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
echo Do you want to release a new pyART version y/n?
read updatepyart
if [[ $updatepyart == "y" ]]; then
echo "Please provide version number, for example 0(major).5(minor).0(micro)"
echo "What is the major version?"
read major
echo "What is the minor version?"
read minor
echo "What is the micro version?"
read micro
echo "Version number is $major.$minor.$micro"
echo "Updating setup.py"
sed -i "/MAJOR =/c\MAJOR = $major" ./src/pyart/setup.py
sed -i "/MINOR =/c\MINOR = $minor" ./src/pyart/setup.py
sed -i "/MICRO =/c\MICRO = $micro" ./src/pyart/setup.py
echo "Updating /doc/source/conf.py"
sed -i "/version = u/c\version = u'$major.$minor'" ./src/pyart/doc/source/conf.py
sed -i "/release = u/c\release = u'$major.$minor.$micro'" ./src/pyart/doc/source/conf.py
echo "Done! You can now create and push the new release with:"
echo "cd ./src/pyart/"
echo "git tag v$major.$minor"
echo "git push origin v$major.$minor."
fi
echo Do you want to release a new pyRAD version y/n?
read updatepyrad
if [[ "$updatepyrad" == "y" ]]; then
echo "Please provide version number, for example 0(major).5(minor).0(micro)"
echo "What is the major version?"
read major
echo "What is the minor version?"
read minor
echo "What is the micro version?"
read micro
echo "Version number is $major.$minor.$micro"
echo "Updating setup.py"
sed -i "/MAJOR =/c\MAJOR = $major" ./src/pyrad_proc/setup.py
sed -i "/MINOR =/c\MINOR = $minor" ./src/pyrad_proc/setup.py
sed -i "/MICRO =/c\MICRO = $micro" ./src/pyrad_proc/setup.py
echo "Updating /doc/source/conf.py"
sed -i "/version = u/c\version = u'$major.$minor'" ./doc/source/conf.py
sed -i "/release = u/c\release = u'$major.$minor.$micro'" ./doc/source/conf.py
echo "Done! You can now create and push the new release with:"
echo "git tag v$major.$minor"
echo "git push origin v$major.$minor."
fi