09eaacd6e653cbbbe4ba98614d01ba38c9c075c0
10 if [ ! -f "$confdir/releaser.conf" ]; then
12 echo "Missing configuration file. Please copy $confdir/releaser.conf.txt to $confdir/releaser.conf and edit it."
15 source "$confdir/releaser.conf"
17 if [ -z "$start_point" -o -z "$version" -o -z "$first_act" ]; then
20 echo " $0 <start_point> <version> --build"
21 echo " $0 <start_point> <version> --publish"
22 echo " $0 <start_point> <version> --clean"
23 echo " $0 <start_point> <version> --build --publish --clean [[ORDER SIGNIFICANT]]"
25 echo " <start_point> is a branch name (e.g. \"master\")"
26 echo " <version> is Civi release (e.g. \"4.3.beta2\"); it will become a tag name"
30 if [ "`echo -n $version | tr -d 0-9.`" = '' ]; then
36 #################################################
38 function do_git_config
() {
39 git config
--global user.name
"$git_author_name"
40 git config
--global user.email
"$git_author_email"
43 #################################################
44 ## Create build directories; checkout repos
45 function do_mk_project
() {
49 "$workdir/$version/export" \
50 "$workdir/$version/gen" \
51 "$workdir/$version/tarballs" \
52 "$workdir/$version/tmp"
54 if [ ! -d "$dir" ]; then
59 $cmd_gitify all
"$git_base_url" "$workdir/$version/export" --l10n
62 #################################################
64 function do_git_tag
() {
66 for dir
in export export
/joomla export
/WordPress export
/packages
; do
68 git checkout
"$start_point"
73 for drupal_ver
in 6.x
7.x
; do
75 git checkout
"${drupal_ver}-${start_point}"
76 git tag
"${drupal_ver}-${version}"
81 #################################################
82 ## Publish tags via git
83 function do_git_tag_push
() {
85 for dir
in export export
/joomla export
/WordPress export
/packages
; do
87 git push
-f origin
"$version"
91 for drupal_ver
in 6.x
7.x
; do
93 git push
-f origin
"${drupal_ver}-${version}"
98 #################################################
100 function do_distmaker
() {
103 ## Determine SCM revision of main codebase
105 rev=$
(git rev-parse HEAD |
head -c10)
108 # create the distmaker.conf file
110 DM_SOURCEDIR=$workdir/$version/export
111 DM_GENFILESDIR=$workdir/$version/gen
112 DM_TMPDIR=$workdir/$version/tmp
113 DM_TARGETDIR=$workdir/$version/tarballs
119 " > $workdir/$version/export
/distmaker
/distmaker.conf
121 # create a minimal civicrm.settings.php file
122 mkdir
-p $workdir/$version/export
/default
123 echo "<?php define('CIVICRM_GETTEXT_RESOURCEDIR', '$workdir/$version/export/l10n/'); define('CIVICRM_UF', 'Drupal'); global \$civicrm_root; \$civicrm_root = '$workdir/$version/export'; ?>" > $workdir/$version/export
/default
/civicrm.settings.php
125 # create a minimal settings_location.php file
126 echo "<?php define('CIVICRM_CONFDIR', '$workdir/$version/export'); ?>" > $workdir/$version/export
/settings_location.php
128 # run the exported distmaker
129 cd $workdir/$version/export
/distmaker
130 .
/distmaker.sh
$distmaker_tgt > $workdir/$version/build.log
133 #################################################
135 function do_publish
() {
137 cd $workdir/$version/tarballs
139 $cmd_md5sum *.
tar.gz
*.tgz
*.
zip > civicrm-
$version.MD5SUMS
140 echo $gpg_pass |
$cmd_gpg --armor --batch --passphrase-fd 0 --sign civicrm-
$version.MD5SUMS
142 if [ "$is_stable" ]; then
143 echo mkdir
${publish_stable_dir}/$version |
$cmd_sftp ${publish_ssh}
144 $cmd_rsync -aP --exclude='*starterkit.tgz' *.
tar.gz
*.
zip *MD5SUMS
* ${publish_ssh}:${publish_stable_dir}/$version
146 echo mkdir
${publish_latest_dir}/$version |
$cmd_sftp ${publish_ssh}
147 $cmd_rsync -aP --exclude='*starterkit.tgz' *.
tar.gz
*.
zip *MD5SUMS
* ${publish_ssh}:${publish_latest_dir}/$version
150 mv *.
tar.gz
*.tgz
*.
zip *MD5SUMS
* $build_dest
152 # publish to latest.civicrm.org
153 # FIXME: isn't this racy when doing concurrent security releases
154 if [ "$is_stable" ]; then
155 echo $version > $latest/stable.txt
157 echo $version > $latest/latest.txt
160 #################################################
162 function do_cleanup
() {
164 rm -rf export gen tmp tarballs tmp
167 #################################################
170 ## Refactoring note: this used to be one monolithic script
196 echo "unrecognized: $ACT"