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

JBIDE-20152 scripts for tagging via buildinfo #132

Merged
merged 1 commit into from
Aug 14, 2015

Conversation

maxandersen
Copy link
Member

Seperate python utilities to convert buildinfo.json to csv and then one for making the tags.

curl http://download.jboss.org/jbosstools/static/mars/development/updates/core/4.3.0.Beta1/buildinfo.json | python buildinfo_to_tags.py -n jbosstools-4.3.0.Beta1 | python tagrepos.py maxandersen secret

@nickboldt
Copy link
Member

+0.5 for buildinfo_to_tags.py -- you need to document usage to include the mention of curl on lines 12-14 and line 24.

curl http://download.jboss.org/jbosstools/static/mars/development/updates/core/4.3.0.Beta1/buildinfo.json | python buildinfo_to_tags.py -n jbosstools-4.3.0.Beta1

After that, +1.

Did not review util/checktags.py, but I assume you tested it because you found missing comma on line 47/59.

@maxandersen
Copy link
Member Author

Was in a hurry so I missed that I included my updates to checktags.py in this PR. I think I'll split those out.

I have a hard time following your comments that just list line numbers and I can't really see why/what in those lines you mean curl should be mentioned ? Could you put the comments on the lines so I can get a better idea what you refer to ?

And yes, I'll go and add usage text to these.

@maxandersen
Copy link
Member Author

Updated the branch.

checktags.py was unrelated to this thus moved to separate PR #133

tagrepos.py was missing from this PR, that is now fixed so you can actually run the commands.

readme.adoc updated with description of the new scripts.

# moar output, set = 1
debug=0

usage = "Usage: %prog [-n NAME] \n\n\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to document usage to include the mention of curl on lines 12-14 and line 24.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why you want curl. why not cat or anything else ?

I'll update it to explicitly state it needs its input on standard input.

except GithubException as ge:
if ge.status == 422:
results = str(ge)
elif ge.status == 400:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since both ifs now do the same thing, could the y be combined into a single line?

if ge.status == 400 or ge.status == 422:
    results = str(ge)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but that is just going to make it harder to edit/debug. But i've changed it since not major deal.

tagrepos.py - take csv input and perform tagging via github API
buildinfototags.py - take buildinfo.json and convert to csv format understood
                     by tagrepos.py
@nickboldt nickboldt merged commit 940c493 into jbosstools:jbosstools-4.3.x Aug 14, 2015
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.

2 participants