List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:September 4 2012 8:04pm
Subject:bzr commit into ABSv2 branch (reggie.burnett:18)
View as plain text  
#At file:///C:/work/wex/absv2/ based on revid:reggie.burnett@stripped

   18 Reggie Burnett	2012-09-04
      we are now passing to manifestupdater the manifest version we want it to use

    modified:
      AbsUtility/Job.cs
=== modified file 'AbsUtility/Job.cs'
=== modified file 'AbsUtility/Job.cs'
--- a/AbsUtility/Job.cs	2012-09-01 00:15:37 +0000
+++ b/AbsUtility/Job.cs	2012-09-04 20:04:05 +0000
@@ -297,7 +297,7 @@
       string dir = GetCacheDirs(series, license);
       ProcessStartInfo pi = new ProcessStartInfo();
       pi.FileName = Path.Combine(Settings.ToolsFolder, "ManifestUpdater.exe");
-      string args = "--in=manifest-base.xml --out=products.xml --wait=n";
+      string args = String.Format("--in=manifest-base.xml --out=products.xml --wait=n --mv={0}", GetNextManifestVersion());
       args += String.Format(" --um=\"{0}\"", Path.Combine(Settings.ToolsFolder, "mysql-installer-update-1.1.4.0.msi"));
       args += String.Format(" --cache=\"{0}\"", dir);
       pi.Arguments = args;
@@ -309,6 +309,15 @@
         throw new Exception("Manifest generation failed");
     }
 
+    private int GetNextManifestVersion()
+    {
+      // get the latest manifest version
+      object mv = MySqlHelper.ExecuteScalar(Settings.ConnectionString, "SELECT manifest_version FROM abs_jobs WHERE status IN ('P', 'R') ORDER BY complete_date DESC LIMIT 1");
+      if (mv == null) throw new Exception("Unable to get latest manifest version from db");
+      int manifestVersion = (int)mv;
+      return manifestVersion+1;
+    }
+
     private string GetCacheDirs(string series, string license)
     {
       StringBuilder cacheDir = new StringBuilder(BuildDir);


Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20120904200405-49efr92ekhl0wpyp.bundle
Thread
bzr commit into ABSv2 branch (reggie.burnett:18) Reggie Burnett5 Sep