Skip to content

Commit

Permalink
Migrate jar_publish config scope.
Browse files Browse the repository at this point in the history
Testing Done:
Before:
```console
$ pants.dev publish src/java/::
...
14:51:22 00:00   [publish]
14:51:22 00:00     [jar]
FAILURE: This repo is not configured to publish externally! Please configure per
http://pantsbuild.github.io/publish.html#authenticating-to-the-artifact-repository,
or re-run with the '--publish-local' flag.
```

And in fact:
```console
$ pants.dev binary src/python/pants/option:migrate_config &>/dev/null && ./dist/migrate_config.pex
Checking config file at ./pants.ini for unmigrated keys.
Found repos in section [publish]. Should be repos in section [publish.jar].
Found restrict_push_branches in section [publish]. Should be restrict_push_branches in section [publish.jar].
```

After:
```console
$ pants.dev publish src/java/::
...
14:51:22 00:00   [complete]
               FAILURE

$ pants.dev publish src/java/::
14:51:46 00:01   [publish]
14:51:46 00:01     [jar]
                   Skipping check for a clean jsirois/publishing/fix_config branch in test mode.No changes for org.pantsbuild#junit-runner-annotations;0.0.1

14:51:46 00:01       [jar-tool]
14:51:46 00:01       [jar-tool]
14:51:46 00:01       [jar-tool]
14:51:46 00:01       [jar-tool]Skipping publish of org.pantsbuild#args4j;0.0.2 in test mode.

14:51:46 00:01       [jar-tool]
14:51:46 00:01       [jar-tool]Skipping publish of org.pantsbuild#jar-tool;0.0.1 in test mode.

14:51:46 00:01       [jar-tool]
14:51:46 00:01       [jar-tool]Skipping publish of org.pantsbuild#junit-runner-withretry;0.0.2 in test mode.

14:51:46 00:01       [jar-tool]
14:51:46 00:01       [jar-tool]Skipping publish of org.pantsbuild#junit-runner;0.0.2 in test mode.

14:51:46 00:01   [complete]
               SUCCESS
```

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

Bugs closed: 1505

Reviewed at https://rbcommons.com/s/twitter/r/2175/
  • Loading branch information
jsirois committed May 8, 2015
1 parent 2d66671 commit ce3df71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pants.ini
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ scala_maximum_heap_size_mb: 1024
java_maximum_heap_size_mb: 1024


[publish]
[publish.jar]
ivy_settings: %(pants_supportdir)s/ivy/publish.ivysettings.xml
push_postscript:
# Prevent Travis-CI from running for this automated jar publish commit:
Expand Down
7 changes: 5 additions & 2 deletions src/python/pants/option/migrate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,13 @@
('jar-publish', 'repos'): ('publish.jar', 'repos'),
('jar-publish', 'publish_extras'): ('publish.jar', 'publish_extras'),

('publish', 'restrict_push_branches'): ('publish.jar', 'restrict_push_branches'),
('publish', 'individual_plugins'): ('publish.jar', 'individual_plugins'),
('publish', 'ivy_settings'): ('publish.jar', 'ivy_settings'),
('publish', 'jvm_options'): ('publish.jar', 'jvm_options'),
('publish', 'repos'): ('publish.jar', 'repos'),
('publish', 'publish_extras'): ('publish.jar', 'publish_extras'),
('publish', 'push_postscript'): ('publish.jar', 'push_postscript'),
('publish', 'repos'): ('publish.jar', 'repos'),
('publish', 'restrict_push_branches'): ('publish.jar', 'restrict_push_branches'),

# Three changes are pertinent to migrate 'ide' to both idea and & eclipse. I tried to capture
# that in notes
Expand Down

0 comments on commit ce3df71

Please sign in to comment.