Detect new package when doing ownership checks.

Review Request #2637 - Created Aug. 15, 2015 and submitted

Information
John Sirois
pants
jsirois/issues/1990
1990, 1996
39be1c8...
Reviewers
pants-reviews
patricklaw, stuhood, zundel
Both the main release and the -o ownership listing now check to see if a
package is new.  The release script skips the ownership check for new
packages now since it will register the package and the ownership
listing just notes the package is new.

 build-support/bin/release.sh | 36 ++++++++++++++++++++++++++----------
 1 file changed, 26 insertions(+), 10 deletions(-)

Used this diff to test with:

$ git diff -U1 contrib/
diff --git a/contrib/release_packages.sh b/contrib/release_packages.sh
index d958e1d..9ac5c5e 100644
--- a/contrib/release_packages.sh
+++ b/contrib/release_packages.sh
@@ -17,3 +17,3 @@
 PKG_SCROOGE=(
-  "pantsbuild.pants.contrib.scrooge"
+  "pantsbuild.pants.contrib.scrooge.NEW!"
   "//contrib/scrooge/src/python/pants/contrib/scrooge:plugin"

For the owners listing this gives:

$ ./build-support/bin/release.sh -o
...
Owners of pantsbuild.pants.testinfra:
  Patrick.Lawson
  stuhood
  ity
  ericzundel
  benjyw
  john.sirois

The pantsbuild.pants.contrib.scrooge.NEW! package is new!  There are no owners yet.

Owners of pantsbuild.pants.contrib.buildgen:
  Patrick.Lawson
  john.sirois
  benjyw
  stuhood
  ity
  ericzundel
...

And then for the release itself I tested with this diff:

$ git diff
diff --git a/build-support/bin/release.sh b/build-support/bin/release.sh
index 63e4cf1..088d50e 100755
--- a/build-support/bin/release.sh
+++ b/build-support/bin/release.sh
@@ -475,8 +475,9 @@ elif [[ "${test_release}" == "true" ]]; then
 else
   banner "Releasing packages to PyPi." && \
   (
-    check_origin && check_clean_master && check_pgp && check_owners && \
-      dry_run_install && publish_packages && tag_release && \
+    check_owners && \
+#    check_origin && check_clean_master && check_pgp && check_owners && \
+#      dry_run_install && publish_packages && tag_release && \
         banner "Successfully released packages to PyPi."
   ) || die "Failed to release packages to PyPi."
 fi

And got:

$ ./build-support/bin/release.sh 

[== 00:00 Releasing packages to PyPi. ==]


[== 00:00 Checking package ownership for pypi user john.sirois of 7 packages ... ==]


[== 00:00 [1/7] checking that john.sirois owns pantsbuild.pants... ==]


[== 00:05 [2/7] checking that john.sirois owns pantsbuild.pants.backend.android... ==]


[== 00:16 [3/7] checking that john.sirois owns pantsbuild.pants.testinfra... ==]


[== 00:25 [4/7] checking that john.sirois owns pantsbuild.pants.contrib.scrooge.NEW!... ==]

The pantsbuild.pants.contrib.scrooge.NEW! package is new!  There are no owners yet.

[== 00:25 [5/7] checking that john.sirois owns pantsbuild.pants.contrib.buildgen... ==]


[== 00:35 [6/7] checking that john.sirois owns pantsbuild.pants.contrib.spindle... ==]


[== 00:44 [7/7] checking that john.sirois owns pantsbuild.pants.contrib.go... ==]


Your pypi account john.sirois needs to be added as an owner for the
following packages:
  pantsbuild.pants.contrib.go

Failed to release packages to PyPi.

That last bit of output is a reminder to Stu to add the current crop of OWNERs to go.

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/75756698

John Sirois
Eric Ayers
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...