[Rt-commit] rt branch, 4.0/customize-upgrade-wording, created. rt-4.0.13-53-gde9278d
Kevin Falcone
falcone at bestpractical.com
Tue Jun 25 18:04:49 EDT 2013
The branch, 4.0/customize-upgrade-wording has been created
at de9278d51aed79e17edd92a7f11d308c4a038643 (commit)
- Log -----------------------------------------------------------------
commit de9278d51aed79e17edd92a7f11d308c4a038643
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jun 7 15:23:33 2013 -0400
Allow an extension to use --action upgrade with different wording
This allows RTIR to use the magic version-parsing code and friendly
wording without it confusingly asking for your RT version.
Future proof using --package which master uses to store the upgrade
steps in the database.
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index f4beb2c..d0e6cf3 100644
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -83,12 +83,13 @@ $| = 1; # unbuffer all output.
my %args = (
dba => '@DB_DBA@',
+ package => 'RT',
);
GetOptions(
\%args,
'action=s',
'force', 'debug',
- 'dba=s', 'dba-password=s', 'prompt-for-dba-password',
+ 'dba=s', 'dba-password=s', 'prompt-for-dba-password', 'package=s',
'datafile=s', 'datadir=s', 'skip-create', 'root-password-file=s',
'help|h',
);
@@ -312,7 +313,7 @@ sub action_upgrade {
if ( defined $upgrading_from ) {
print "Doesn't match #.#.#: ";
} else {
- print "Enter RT version you're upgrading from: ";
+ print "Enter $args{package} version you're upgrading from: ";
}
$upgrading_from = scalar <STDIN>;
chomp $upgrading_from;
@@ -345,7 +346,7 @@ sub action_upgrade {
if ( defined $custom_upgrading_to ) {
print "Doesn't match #.#.#: ";
} else {
- print "\nEnter RT version if you want to stop upgrade at some point,\n";
+ print "\nEnter $args{package} version if you want to stop upgrade at some point,\n";
print " or leave it blank if you want apply above upgrades: ";
}
$custom_upgrading_to = scalar <STDIN>;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list