summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install.hostmaster.inc3
-rw-r--r--install.sh.txt7
-rw-r--r--provision.inc7
-rw-r--r--release.sh12
-rw-r--r--upgrade.sh.txt2
5 files changed, 16 insertions, 15 deletions
diff --git a/install.hostmaster.inc b/install.hostmaster.inc
index 3487b9d..2b6d262 100644
--- a/install.hostmaster.inc
+++ b/install.hostmaster.inc
@@ -7,7 +7,8 @@
function drush_provision_hostmaster_install_validate($site = NULL) {
// set defaults for this whole script
// those are settings that are not prompted to the user but still overridable
- $version = drush_set_default('version', drush_get_option('version', 'HEAD'));
+ drush_set_default('version', provision_version());
+ $version = drush_get_option('version');
$aegir_root = drush_set_default('aegir_root', drush_server_home());
drush_set_default('root', $aegir_root . '/' . 'hostmaster-' . $version);
drush_set_default('r', drush_get_option('root'));
diff --git a/install.sh.txt b/install.sh.txt
index 75dfd58..6641d28 100644
--- a/install.sh.txt
+++ b/install.sh.txt
@@ -26,11 +26,10 @@
# 2. downloads provision in $AEGIR_HOME/.drush
# 3. delegate the rest of the install to hostmaster-install
########################################################################
-# basic variables, change before release
-AEGIR_VERSION="HEAD"
-DRUSH_VERSION=6.x-3.3
-# when adding a variable here, add it to the display below
+# guess the aegir version based on the info file
+AEGIR_VERSION=`sed -n '/^version/{s/^.*= //;p}' provision.info`
+DRUSH_VERSION=6.x-3.3
########################################################################
# functions
diff --git a/provision.inc b/provision.inc
index f2d3f19..79d3f5d 100644
--- a/provision.inc
+++ b/provision.inc
@@ -298,6 +298,13 @@ function provision_backend_invoke($target, $command, $arguments = array(), $opti
return drush_backend_invoke_args('@' . ltrim($target, '@') . ' ' . $command, $arguments, $options + array('root' => null, 'uri' => null), $mode);
}
+/**
+ * parse the .ini file to get the aegir version
+ */
+function provision_version() {
+ $ini = parse_ini_file(dirname(__FILE__) . '/provision.info');
+ return $ini['version'];
+}
/**
* A base class for the service and file handling classes that implements
diff --git a/release.sh b/release.sh
index 1cce50d..abdb662 100644
--- a/release.sh
+++ b/release.sh
@@ -83,9 +83,9 @@ sed -i'.tmp' -e'/^projects\[hostmaster\]\[download\]\[type\]/s/=.*$/ = "get"/' \
echo changing INSTALL.txt to point to tagged install.sh
sed -i'.tmp' -e"/http:\/\/git.aegirproject.org\/?p=provision.git;a=blob_plain;f=install.sh.txt;hb=HEAD/s/HEAD/provision-$version/" docs/INSTALL.txt && git add docs/INSTALL.txt && rm docs/INSTALL.txt.tmp
-echo changing INSTALL.txt to point hostmaster-install --version to tag
-sed -i'.tmp' -e"s/--version=HEAD/--version=$version/" docs/INSTALL.txt
-git add docs/INSTALL.txt && rm docs/INSTALL.txt.tmp
+echo changing hostmaster-install version
+sed -i'.tmp' -e"s/version =.*$/version = $version/" provision.info
+git add provision.info && rm provision.info.tmp
echo changing UPGRADE.txt to point to tagged upgrade.sh
sed -i'.tmp' -e"/http:\/\/git.aegirproject.org\/?p=provision.git;a=blob_plain;f=upgrade.sh.txt;hb=HEAD/s/HEAD/provision-$version/" docs/UPGRADE.txt && git add docs/UPGRADE.txt && rm docs/UPGRADE.txt.tmp
@@ -98,12 +98,6 @@ if ! [ -z "$old_version" ]; then
fi
git add docs/UPGRADE.txt && rm docs/UPGRADE.txt.tmp
-echo changing install.sh.txt version
-sed -i'.tmp' -e"s/AEGIR_VERSION=.*$/AEGIR_VERSION=\"$version\"/" install.sh.txt && git add install.sh.txt && rm install.sh.txt.tmp
-
-echo changing upgrade.sh.txt version
-sed -i'.tmp' -e"s/AEGIR_VERSION=.*$/AEGIR_VERSION=\"$version\"/" upgrade.sh.txt && git add upgrade.sh.txt && rm upgrade.sh.txt.tmp
-
echo resulting changes to be committed:
git diff --cached | cat
diff --git a/upgrade.sh.txt b/upgrade.sh.txt
index 933275f..16d2572 100644
--- a/upgrade.sh.txt
+++ b/upgrade.sh.txt
@@ -11,7 +11,7 @@
########################################################################
# basic variables, change before running
-AEGIR_VERSION=HEAD
+AEGIR_VERSION=`sed -n '/^version/{s/^.*= //;p}' provision.info`
AEGIR_DOMAIN=aegir.example.com
AEGIR_DIR=/var/aegir