[Rt-commit] rtir branch, 4.0/version-sort, created. 4.0.0rc1-12-gf8d672a
Shawn Moore
shawn at bestpractical.com
Tue Jul 5 17:03:05 EDT 2016
The branch, 4.0/version-sort has been created
at f8d672a05f2d965e3527374d1c952328000501e6 (commit)
- Log -----------------------------------------------------------------
commit f8d672a05f2d965e3527374d1c952328000501e6
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Tue Jul 5 17:02:49 2016 -0400
Use RT::Handle's cmp_version rather than Sort::Versions
This avoids an implicit dependency
diff --git a/t/upgrade/2.6.0-to-current.t b/t/upgrade/2.6.0-to-current.t
index afdb378..ca78b4e 100644
--- a/t/upgrade/2.6.0-to-current.t
+++ b/t/upgrade/2.6.0-to-current.t
@@ -14,7 +14,6 @@ BEGIN { unless ( -d "../rt/etc/upgrade/" ) {
} }
use RT::IR::Test tests => undef;
-use Sort::Versions;
{
RT::IR::Test->import_snapshot( 'rtir-2.6.after-rt-upgrade.sql' );
@@ -22,9 +21,9 @@ use Sort::Versions;
# upgrade database for RT 4.2.0 on
{
my @versions;
- for my $version (sort { versioncmp($a, $b) } map { m{upgrade/([\w.]+)/} && $1 } glob('../rt/etc/upgrade/4.*/')) {
- next if versioncmp($version, '4.2.0') == -1;
- next if versioncmp($version, $RT::VERSION) == 1;
+ for my $version (sort { RT::Handle::cmp_version($a, $b) } map { m{upgrade/([\w.]+)/} && $1 } glob('../rt/etc/upgrade/4.*/')) {
+ next if RT::Handle::cmp_version($version, '4.2.0') == -1;
+ next if RT::Handle::cmp_version($version, $RT::VERSION) == 1;
push @versions, $version;
}
@@ -35,8 +34,8 @@ use Sort::Versions;
# upgrade database for RTIR 2.6.0 on
{
my @versions;
- for my $version (sort { versioncmp($a, $b) } map { m{upgrade/([\w.]+)/} && $1 } glob('etc/upgrade/*/')) {
- next if versioncmp($version, '2.6.0') == -1;
+ for my $version (sort { RT::Handle::cmp_version($a, $b) } map { m{upgrade/([\w.]+)/} && $1 } glob('etc/upgrade/*/')) {
+ next if RT::Handle::cmp_version($version, '2.6.0') == -1;
push @versions, $version;
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list