Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set the source version to 'latest-snapshot' #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rs017991
Copy link

The existing 'latest' behaviour only works for releases, so I added a 'latest-snapshot' option which will result in the latest unique version of the latest snapshot.

Examples

Let's say you have the following unique versions of your artifact:
1.0.0-SNAPSHOT:

  • 1.0.0-20170328.031519-19
  • 1.0.0-20180429.041620-20

2.0.0-SNAPSHOT:

  • 2.0.0-20190101.010101-01
  • 2.0.0-20190202.020202-02

Then these are the results you will get by setting the source.version to the following values:

source.version Resulting JSON
1.0.0-SNAPSHOT [{"version": "1.0.0-20180429.041620-20"}]
2.0.0-SNAPSHOT [{"version": "2.0.0-20190202.020202-02"}]
latest-snapshot [{"version": "2.0.0-20190202.020202-02"}]

This will result in the latest unique version of the latest snapshot
@rs017991
Copy link
Author

@patrickcrocker Note: Everything in the test folder is g2g, but I wasn't able to run itest so didn't feel comfortable changing those (aside from constant that I moved to helpers.sh)

@rs017991
Copy link
Author

BTW if anybody wants to try this out, I have it deployed to Dockerhub:

resource_types:
- name: maven-resource
  type: docker-image
  source:
    repository: rs017991/maven-resource
    tag: PR34

That said, I'll likely delete it after merge, so don't go depending on it for real.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant