bump_version | Go tool for bumping version numbers
kandi X-RAY | bump_version Summary
kandi X-RAY | bump_version Summary
This is a tool for bumping version numbers in Go files.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parse parses a version string into a Version object .
- main is the entry point for testing
- changeVersion changes a version of the given version
- findBasicLit searches for a BasicLit .
- changeInFile runs the given function on the given file with the given function .
- BumpInFile dumps a version of a version to a version .
- String returns a string representation of the version
- writeFile prints a file to a file
- runCommand runs the given command and returns the output .
- SetInFile changes the version of a version .
bump_version Key Features
bump_version Examples and Code Snippets
Community Discussions
Trending Discussions on bump_version
QUESTION
I have an action on master branch which on push/merge builds a package, uploads it to PyPI then checks out to develop branch, bumps version in develop branch and pushes to the origin of develop branch. Develop branch has an action that listens to push/merge and does a snapshot release. When I push to develop the develop action works perfectly and does a snapshot release, but when master branch pushes, push is successful but the action does not get triggered. What am I missing? Both actions are added below.
...ANSWER
Answered 2019-Dec-02 at 20:51Provided secrets.GITHUB_TOKEN
is intentionally not allowed to trigger workflows. As seen in documention:
(...) if an action pushes code using the repository's
GITHUB_TOKEN
, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.
If you need your automagic push to be "visible" by workflows, you need to create Personal Access Token, add it to repo secrets, and use that instead of GITHUB_TOKEN
.
Note that GitHub assumes that you know what you're doing, if you use non-stock token - which means preventing possible infinite loop is on you. While it's not a case in your scenario for now (develop branch does not push anything), it's worth to remember in case one of workflows will change some day.
QUESTION
I am trying to bump the version of my package.json file when I commit, but only if the commit message is prefixed correctly: MJ
prefix triggers a patch bump, ^
prefix triggers a minor bump. I wrote a gulp task to do this and it works, the only problem is that I can't get the message of the current commit, execute the task, then add package.json to the commit and continue.
I tried running my task on these two git hooks:
pre-commit
Problem:
- I only have access the previous commit message in this hook, not the one we're doing right now.
What works
- I can bump the version, but only based on the previous commit message
- I can stage package.json
- package.json can then be added to the commit along with the rest
prepare-commit-msg
Problem:
- staging package.json does not add it to the commit
What works
- I can bump the version based on the current commit message
- I can stage package.json
This is my gulp task that I've tried with the two hooks. I removed some noise to try to keep it minimal.
...ANSWER
Answered 2019-Mar-30 at 03:21You can use the commit-msg
hook to read the commit message, take actions based on that, stage files and commit
.git/hooks/commit-msg
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bump_version
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page