| OLD | NEW |
| 1 # This Source Code Form is subject to the terms of the Mozilla Public | 1 # This Source Code Form is subject to the terms of the Mozilla Public |
| 2 # License, v. 2.0. If a copy of the MPL was not distributed with this | 2 # License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 4 | 4 |
| 5 from __future__ import print_function | 5 from __future__ import print_function |
| 6 | 6 |
| 7 import os | 7 import os |
| 8 import operator | 8 import operator |
| 9 import re | 9 import re |
| 10 import codecs | 10 import codecs |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 create_build(platform, baseDir, downloads_repo, version, | 272 create_build(platform, baseDir, downloads_repo, version, |
| 273 used_key_file), | 273 used_key_file), |
| 274 ) | 274 ) |
| 275 | 275 |
| 276 # Only create one commit, one tag and one source archive for all | 276 # Only create one commit, one tag and one source archive for all |
| 277 # platforms | 277 # platforms |
| 278 archive_path = os.path.join( | 278 archive_path = os.path.join( |
| 279 downloads_repo, | 279 downloads_repo, |
| 280 'adblockplus-{}-source.tgz'.format(release_identifier), | 280 'adblockplus-{}-source.tgz'.format(release_identifier), |
| 281 ) | 281 ) |
| 282 create_sourcearchive(baseDir, archive_path) | |
| 283 downloads.append(archive_path) | |
| 284 try: | 282 try: |
| 285 release_commit(baseDir, extension_name, version, target_platforms) | 283 release_commit(baseDir, extension_name, version, target_platforms) |
| 286 except subprocess.CalledProcessError as e: | 284 except subprocess.CalledProcessError as e: |
| 287 if not (re_release and 'nothing changed' in e.output): | 285 if not (re_release and 'nothing changed' in e.output): |
| 288 raise | 286 raise |
| 289 | 287 |
| 288 create_sourcearchive(baseDir, archive_path) |
| 289 downloads.append(archive_path) |
| 290 |
| 290 release_tag(baseDir, release_identifier, extension_name) | 291 release_tag(baseDir, release_identifier, extension_name) |
| 291 | 292 |
| 292 # Now add the downloads and commit | 293 # Now add the downloads and commit |
| 293 subprocess.check_call(['hg', 'add', '-R', downloads_repo] + downloads) | 294 subprocess.check_call(['hg', 'add', '-R', downloads_repo] + downloads) |
| 294 release_commit(downloads_repo, extension_name, version, target_platforms) | 295 release_commit(downloads_repo, extension_name, version, target_platforms) |
| 295 | 296 |
| 296 # Push all changes | 297 # Push all changes |
| 297 subprocess.check_call(['hg', 'push', '-R', baseDir]) | 298 subprocess.check_call(['hg', 'push', '-R', baseDir]) |
| 298 subprocess.check_call(['hg', 'push', '-R', downloads_repo]) | 299 subprocess.check_call(['hg', 'push', '-R', downloads_repo]) |
| OLD | NEW |