forked from daisy/pipeline-assembly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_rd.sh
executable file
·24 lines (21 loc) · 3.93 KB
/
update_rd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
snapshot="false"
descriptor=./target/release-descriptor/releaseDescriptor.xml
version=$(xmllint --pretty 2 ./target/release-descriptor/releaseDescriptor.xml | grep version | sed -n '2p' | sed 's/\s//g'| sed -n 's/version="\(.*\)"/\1/p')
echo "Checking out gh-pages"
git checkout gh-pages
git checkout -b rd-$version
if [ "x$(echo $version | grep SNAPSHOT)" == "x" ]; then
echo "Creating release descriptor"
cp $descriptor ./releases/current
else
echo "Creating snapshot descriptor"
cp $descriptor ./releases/snapshot
fi
cp $descriptor releases/$version
echo "Commiting changes"
git add -A
git commit -m "Add release descriptors for $version"
git push -u origin rd-$version
echo "Please, remember to merge rd-$version into gh-pages"
git checkout master