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

Add Scripts for Bumping Versions and Tagging #31

Merged
merged 4 commits into from
Jan 10, 2020

Conversation

mcdonnnj
Copy link
Member

🗣 Description

This PR adds the bump_version.sh and tag.sh scripts to allow easy version bumping and tagging for Python projects. The semver package was also added as a requirement since it is used by bump_version.sh.

💭 Motivation and Context

Versions and tags are used for marking a release point, and these helper scripts are already in use to that end in some Python projects we have. I thought it would be useful to add it to skeleton-python-library so that all Python projects will be able to leverage that functionality.

🧪 Testing

Verified that the version was correctly retrieved with bump_version.sh show. Since these scripts are in use in other projects I assume other functionality will work correctly.

🚥 Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (causes existing functionality to change)

✅ Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…g through scripts. Update setup.py to include the semver package which is used by the bump_version.sh script.
@mcdonnnj mcdonnnj requested review from dav3r, felddy, jsf9k and a team as code owners January 10, 2020 16:15
@mcdonnnj mcdonnnj self-assigned this Jan 10, 2020
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

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

Small change requested.

setup.py Outdated Show resolved Hide resolved
@mcdonnnj mcdonnnj requested a review from jsf9k January 10, 2020 17:23
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

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

Ad astra!

Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

Approved, but I request that you add one comment. ✈️ ⚙️

echo Changing version from "$old_version" to "$new_version"
tmp_file=/tmp/version.$$
sed "s/$old_version/$new_version/" $VERSION_FILE > $tmp_file
mv $tmp_file $VERSION_FILE
Copy link
Member

Choose a reason for hiding this comment

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

Since it may come up in the future and so we don't forget our past, we should probably add a brief comment here about why we do this business with the temp file (short version: Mac OS uses BSD sed - see cisagov/cyhy-mailer@283dcbf)

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good point. I've added comments in 03278ca to explain.

Copy link
Member

@felddy felddy left a comment

Choose a reason for hiding this comment

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

Looks good. Good idea adding this functionality.

@mcdonnnj mcdonnnj merged commit 117070c into develop Jan 10, 2020
@mcdonnnj mcdonnnj deleted the improvement/add_version_bump_and_tag_scripts branch January 10, 2020 18:17
mcdonnnj added a commit that referenced this pull request Feb 11, 2020
Cleanup Linux instructions and add WSL references to CONTRIBUTING.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants