コード例 #1
0
    def test_product_detail_firefox_release(self):
        with mock.patch('time.strftime') as t:
            t.return_value = "2014-09-08"

            updateProductDetailFiles(self.targetSVNDirectory, "firefox",
                                     "33.0")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "LATEST_FIREFOX_RELEASED_VERSION.php"), "'33.0'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "LATEST_FIREFOX_VERSION.php"), "'33.0'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "history/firefoxHistory.class.php"),
                "'33.0' => '2014-09-08',")
            updateProductDetailFiles(self.targetSVNDirectory, "firefox",
                                     "34.0.2")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "LATEST_FIREFOX_RELEASED_VERSION.php"),
                "'34.0.2'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "LATEST_FIREFOX_VERSION.php"), "'34.0.2'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "history/firefoxHistory.class.php"),
                "'34.0.2' => '2014-09-08',")
コード例 #2
0
 def test_product_detail_firefox_beta(self):
     with mock.patch('time.strftime') as t:
         t.return_value = "2014-09-06"
         updateProductDetailFiles(self.targetSVNDirectory, "firefox", "33.0b12")
         self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "LATEST_FIREFOX_DEVEL_VERSION.php"), "'33.0b12'")
         self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "LATEST_FIREFOX_RELEASED_DEVEL_VERSION.php"), "'33.0b12'")
         self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "history/firefoxHistory.class.php"), "'33.0b12' => '2014-09-06',")
コード例 #3
0
    def test_product_detail_firefox_esr(self):
        with mock.patch('time.strftime') as t:
            t.return_value = "2014-09-11"

            updateProductDetailFiles(self.targetSVNDirectory, "firefox", "51.1.0esr")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "FIREFOX_ESR.php"), "'51.1.0esr'")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "history/firefoxHistory.class.php"), "'51.1.0' => '2014-09-11',")
コード例 #4
0
ファイル: stage-tasks.py プロジェクト: bw1138/build-tools
def updateProductDetails(productName,
                         version,
                         productDetailsRepo,
                         mozillaComRepo,
                         svnSshKey,
                         dryRun=False):
    """
    Add a new version to the product details
    """
    os.environ["SVN_SSH"] = "ssh -i %s" % svnSshKey
    cwd = os.getcwd()
    pdDir = path.join(cwd, "product-details.svn")
    mcDir = path.join(cwd, "mozilla.com.svn")
    retry(checkoutSVN, args=(pdDir, productDetailsRepo), attempts=3)
    retry(checkoutSVN, args=(mcDir, mozillaComRepo), attempts=3)
    # Update the PHP files
    updateProductDetailFiles(pdDir, productName, version)
    # Export to json
    exportJSON(pdDir)
    # Commit to svn
    commitSVN(pdDir, productName, version, dryRun)
    # Get the svn revision of the p-d repository
    svnRev = getSVNrev(pdDir)
    # Update Mozilla.com
    updateRev(mcDir, svnRev)
    # commit Mozilla.com
    commitSVN(pdDir, productName, version, dryRun)
コード例 #5
0
    def test_product_detail_thunderbird_release(self):
        with mock.patch('time.strftime') as t:
            t.return_value = "2014-09-10"

            updateProductDetailFiles(self.targetSVNDirectory, "thunderbird", "33.0")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "LATEST_THUNDERBIRD_VERSION.php"), "'33.0'")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "history/thunderbirdHistory.class.php"), "'33.0' => '2014-09-10',")
            updateProductDetailFiles(self.targetSVNDirectory, "thunderbird", "34.0.2")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "LATEST_THUNDERBIRD_VERSION.php"), "'34.0.2'")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "history/thunderbirdHistory.class.php"), "'34.0.2' => '2014-09-10',")
コード例 #6
0
    def test_product_detail_fennec_release(self):
        with mock.patch('time.strftime') as t:
            t.return_value = "2014-09-07"

            updateProductDetailFiles(self.targetSVNDirectory, "mobile", "32.0")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "mobile_latest_version.php"), "'32.0'")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "history/mobileHistory.class.php"), "'32.0' => '2014-09-07',")
            updateProductDetailFiles(self.targetSVNDirectory, "mobile", "31.0.1")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "mobile_latest_version.php"), "'31.0.1'")
            self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "history/mobileHistory.class.php"), "'31.0.1' => '2014-09-07',")
コード例 #7
0
 def test_product_detail_fennec_beta(self):
     with mock.patch('time.strftime') as t:
         t.return_value = "2014-09-05"
         updateProductDetailFiles(self.targetSVNDirectory, "mobile",
                                  "32.0b3")
         self.ContentCheckfile(
             os.path.join(self.targetSVNDirectory,
                          "mobile_beta_version.php"), "'32.0b3'")
         self.ContentCheckfile(
             os.path.join(self.targetSVNDirectory,
                          "history/mobileHistory.class.php"),
             "'32.0b3' => '2014-09-05',")
コード例 #8
0
    def test_product_detail_firefox_esr(self):
        with mock.patch('time.strftime') as t:
            t.return_value = "2014-09-11"

            updateProductDetailFiles(self.targetSVNDirectory, "firefox",
                                     "51.1.0esr")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory, "FIREFOX_ESR.php"),
                "'51.1.0esr'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "history/firefoxHistory.class.php"),
                "'51.1.0' => '2014-09-11',")
コード例 #9
0
    def test_product_detail_fennec_release(self):
        with mock.patch('time.strftime') as t:
            t.return_value = "2014-09-07"

            updateProductDetailFiles(self.targetSVNDirectory, "mobile", "32.0")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "mobile_latest_version.php"), "'32.0'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "history/mobileHistory.class.php"),
                "'32.0' => '2014-09-07',")
            updateProductDetailFiles(self.targetSVNDirectory, "mobile",
                                     "31.0.1")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "mobile_latest_version.php"), "'31.0.1'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "history/mobileHistory.class.php"),
                "'31.0.1' => '2014-09-07',")
コード例 #10
0
ファイル: stage-tasks.py プロジェクト: Callek/build-tools
def updateProductDetails(productName, version, productDetailsRepo, mozillaComRepo, svnSshKey, dryRun=False):
    """
    Add a new version to the product details
    """
    os.environ["SVN_SSH"] = "ssh -i %s" % svnSshKey
    pdDir = "product-details.svn"
    mcDir = "mozilla.com.svn"
    retry(checkoutSVN, args=(pdDir, productDetailsRepo), attempts=3)
    retry(checkoutSVN, args=(mcDir, mozillaComRepo), attempts=3)
    # Update the PHP files
    updateProductDetailFiles(pdDir, productName, version)
    # Export to json
    exportJSON(pdDir)
    # Commit to svn
    commitSVN(pdDir, productName, version, dryRun)
    # Get the svn revision of the p-d repository
    svnRev = getSVNrev(pdDir)
    # Update Mozilla.com
    updateRev(mcDir, svnRev)
    # commit Mozilla.com
    commitSVN(pdDir, productName, version, dryRun)
コード例 #11
0
    def test_product_detail_thunderbird_release(self):
        with mock.patch('time.strftime') as t:
            t.return_value = "2014-09-10"

            updateProductDetailFiles(self.targetSVNDirectory, "thunderbird",
                                     "33.0")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "LATEST_THUNDERBIRD_VERSION.php"), "'33.0'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "history/thunderbirdHistory.class.php"),
                "'33.0' => '2014-09-10',")
            updateProductDetailFiles(self.targetSVNDirectory, "thunderbird",
                                     "34.0.2")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "LATEST_THUNDERBIRD_VERSION.php"), "'34.0.2'")
            self.ContentCheckfile(
                os.path.join(self.targetSVNDirectory,
                             "history/thunderbirdHistory.class.php"),
                "'34.0.2' => '2014-09-10',")
コード例 #12
0
 def test_product_detail_firefox_aurora(self):
     updateProductDetailFiles(self.targetSVNDirectory, "firefox", "43.0a2")
     self.ContentCheckfile(
         os.path.join(self.targetSVNDirectory, "FIREFOX_AURORA.php"),
         "'43.0a2'")
コード例 #13
0
 def test_product_detail_fennec_aurora(self):
     updateProductDetailFiles(self.targetSVNDirectory, "mobile", "42.0a2")
     self.ContentCheckfile(
         os.path.join(self.targetSVNDirectory, "mobile_alpha_version.php"),
         "'42.0a2'")
コード例 #14
0
 def test_product_detail_fennec_beta(self):
     with mock.patch('time.strftime') as t:
         t.return_value = "2014-09-05"
         updateProductDetailFiles(self.targetSVNDirectory, "mobile", "32.0b3")
         self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "mobile_beta_version.php"), "'32.0b3'")
         self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "history/mobileHistory.class.php"), "'32.0b3' => '2014-09-05',")
コード例 #15
0
 def test_product_detail_firefox_aurora(self):
     updateProductDetailFiles(self.targetSVNDirectory, "firefox", "43.0a2")
     self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "FIREFOX_AURORA.php"), "'43.0a2'")
コード例 #16
0
 def test_product_detail_fennec_aurora(self):
     updateProductDetailFiles(self.targetSVNDirectory, "mobile", "42.0a2")
     self.ContentCheckfile(os.path.join(self.targetSVNDirectory, "mobile_alpha_version.php"), "'42.0a2'")