X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tools%2Fscripts%2Freleaser%2Freleaser;h=08238b5a80efda23e27ef6006c8baed59a653cd9;hb=e8cca51aa6ed1feb98786bd980a1395d8a9a785a;hp=09eaacd6e653cbbbe4ba98614d01ba38c9c075c0;hpb=8d33e12be1cfc6226cada7978de1306924fb6040;p=civicrm-core.git diff --git a/tools/scripts/releaser/releaser b/tools/scripts/releaser/releaser index 09eaacd6e6..08238b5a80 100755 --- a/tools/scripts/releaser/releaser +++ b/tools/scripts/releaser/releaser @@ -19,8 +19,9 @@ if [ -z "$start_point" -o -z "$version" -o -z "$first_act" ]; then echo "Usage:" echo " $0 --build" echo " $0 --publish" + echo " $0 --update" echo " $0 --clean" - echo " $0 --build --publish --clean [[ORDER SIGNIFICANT]]" + echo " $0 --build --publish --update --clean [[ORDER SIGNIFICANT]]" echo "Arguments:" echo " is a branch name (e.g. \"master\")" echo " is Civi release (e.g. \"4.3.beta2\"); it will become a tag name" @@ -56,7 +57,7 @@ function do_mk_project() { fi done - $cmd_gitify all "$git_base_url" "$workdir/$version/export" --l10n + $cmd_gitify all "$git_base_url" "$workdir/$version/export" --l10n --branch "$start_point" --skip-gencode } ################################################# @@ -116,6 +117,12 @@ function do_distmaker() { DM_VERSION=$version DM_REVISION=$rev DM_ZIP=$cmd_zip + DM_REF_CORE=${start_point} + DM_REF_DRUPAL=7.x-${start_point} + DM_REF_DRUPAL6=6.x-${start_point} + DM_REF_JOOMLA=${start_point} + DM_REF_WORDPRESS=${start_point} + DM_REF_PACKAGES=${start_point} " > $workdir/$version/export/distmaker/distmaker.conf # create a minimal civicrm.settings.php file @@ -157,6 +164,45 @@ function do_publish() { echo $version > $latest/latest.txt } +################################################# +## Update Version Info +function do_update() { + echo "VERSION UPDATE: Enter the version that comes after $version (or enter nothing to abort)" + read new_ver + if [ -n "$new_ver" ]; then + cd $workdir/$version/export + # create sql upgrade file + tpl="CRM/Upgrade/Incremental/sql/$new_ver.mysql.tpl" + if [ ! -f $tpl ]; then + echo "{* file to handle db changes in $new_ver during upgrade *}" > $tpl + fi + # escape regex special chars + arg=`echo "$version" | sed 's:[]\[\^\$\.\*\/]:\\\\&:g'` + for file in xml/version.xml sql/civicrm_generated.mysql; do + set -ex + git checkout $file + sed "s/$arg/$new_ver/" < $file > $file.tmp + mv $file.tmp $file + set +x + done + # print the diff directly to the screen + git diff | cat + echo "Push these changes? y/n" + read input + if [ "$input" = "y" ]; then + set -ex + git add xml/version.xml sql/civicrm_generated.mysql $tpl + git commit -m "Update version to $new_ver" + git push origin "$start_point" + set +x + else + do_update + fi + else + echo "No version entered. Aborting version update." + fi +} + ################################################# ## Cleanup function do_cleanup() { @@ -187,6 +233,10 @@ for ACT in "$@" ; do do_publish set +x ;; + --update) + set +x + do_update + ;; --clean) set -ex do_cleanup