jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/403564 )
Change subject: releases: Unify root_dir/build_dir
......................................................................
releases: Unify root_dir/build_dir
Since we don't put ./patches or ./upload into the build directory
anymore, the required ./build subdirectory is kind of silly. Only
do that if we're operating in the same directory as the actual
script cuz that would get ugly/messy
Change-Id: I372a16c9a95eba589fbc21dffbcb7c5362c2222c
---
M make-release/makerelease.py
1 file changed, 8 insertions(+), 9 deletions(-)
Approvals:
Chad: Looks good to me, approved
jenkins-bot: Verified
diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index e822d19..262f524 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -104,6 +104,9 @@
:param branch: branch we care about patching
:return: all patches that are appropriate
"""
+ # Sometimes patch_dir isn't given!
+ if patch_dir is None:
+ return []
patch_path_pattern = os.path.join(patch_dir, branch, repo, '*.patch')
return sorted(glob.glob(patch_path_pattern))
@@ -479,7 +482,7 @@
def do_release(self, version, extensions=None):
- root_dir = self.options.buildroot
+ build_dir = self.options.buildroot
patch_dir = self.options.patch_dir
# variables related to the version
@@ -488,14 +491,10 @@
prev_version = version.prev_version
major_ver = version.major
- if root_dir is None:
- root_dir = os.getcwd()
-
- if not os.path.exists(root_dir):
- logging.debug('Creating %s', root_dir)
- os.mkdir(root_dir)
-
- build_dir = root_dir + '/build'
+ # If we're operating in the same repo as this script, kindly make it
+ # in a subdirectory to avoid polluting things
+ if build_dir == os.path.dirname(os.path.abspath(__file__)):
+ build_dir = os.path.join(build_dir, 'build')
if not os.path.exists(build_dir):
logging.debug('Creating build dir: %s', build_dir)
--
To view, visit https://gerrit.wikimedia.org/r/403564
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I372a16c9a95eba589fbc21dffbcb7c5362c2222c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits