Skip to content
Snippets Groups Projects
Commit e28df4fb authored by Tim Otten's avatar Tim Otten
Browse files

Merge pull request #469 from colemanw/versionUpdate

Add 'update' to releaser script
parents d491bd44 ba9b059f
No related branches found
Tags 4.3.1
No related merge requests found
......@@ -19,8 +19,9 @@ if [ -z "$start_point" -o -z "$version" -o -z "$first_act" ]; then
echo "Usage:"
echo " $0 <start_point> <version> --build"
echo " $0 <start_point> <version> --publish"
echo " $0 <start_point> <version> --update"
echo " $0 <start_point> <version> --clean"
echo " $0 <start_point> <version> --build --publish --clean [[ORDER SIGNIFICANT]]"
echo " $0 <start_point> <version> --build --publish --update --clean [[ORDER SIGNIFICANT]]"
echo "Arguments:"
echo " <start_point> is a branch name (e.g. \"master\")"
echo " <version> is Civi release (e.g. \"4.3.beta2\"); it will become a tag name"
......@@ -163,6 +164,25 @@ function do_publish() {
echo $version > $latest/latest.txt
}
#################################################
## Update Version Info
function do_update() {
echo "VERSION UPDATE: Please enter the version that comes after $version"
read new_ver
if [ -n "$new_ver" ]; then
cd $workdir/$version/export
for file in xml/version.xml sql/civicrm_generated.mysql; do
sed "s/$version/$new_ver/g" < $file > $file.tmp
mv $file.tmp $file
git add $file
done
git commit -m "Update version to $new_ver"
git push origin "$start_point"
else
echo "No version entered. Aborting version update."
fi
}
#################################################
## Cleanup
function do_cleanup() {
......@@ -193,6 +213,11 @@ for ACT in "$@" ; do
do_publish
set +x
;;
--update)
set -ex
do_update
set +x
;;
--clean)
set -ex
do_cleanup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment