jaspernbrouwer / git-flow-hooks Goto Github PK
View Code? Open in Web Editor NEWSome useful hooks for git-flow (AVH Edition)
License: MIT License
Some useful hooks for git-flow (AVH Edition)
License: MIT License
For the Windows folks in here, I created a Chocolatey package:
https://chocolatey.org/packages/gitflow-hooks
The source code is here: https://github.com/dhilgarth/chocolatey-packages/tree/master/manual/gitflow-hooks.
msysgit doesn't seem to support the new regex syntax you are using.
Line 39 of semverbump.sh causes an error.
I changed it to this and now it seems to work:
elif echo "$VERSION_ARG" | grep -E '^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$' > /dev/null
This is based on the suggestion from http://stackoverflow.com/questions/15510083/syntax-error-operator-in-msysgit-bash
git clone [email protected]:jaspernbrouwer/git-flow-hooks.git
Cloning into 'git-flow-hooks'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So I change clone command:
git clone https://github.com/jaspernbrouwer/git-flow-hooks
Please update your DOC
I use Ubuntu 15.04 with 'git flow 1.8.0 (AVH Edition)'.
README says:
If git flow release start and git flow hotfix start are run without a version, the version will be bumped automatically.
However when I try to start release without version number then I get this:
'fatal: 'release/.0.1' is not a valid branch name.
Fatal: Could not create release branch 'release/.0.1''
on centos,
git clone [email protected]:jaspernbrouwer/git-flow-hooks.git
git flow init
git config gitflow.path.hooks git-flow-hooks/
git config gitflow.hotfix.finish.message "Hotfix %tag%"
git config gitflow.release.finish.message "Release %tag%"
git flow release start // error: Missing argument < version >
is any wrong in these steps ?
I want your hooks to be available in every local repository, existing or created in the future.
Generally, it's very easy to achieve this by globally setting gitflow.path.hooks.
What doesn't work is a global customization for all projects. For example, my version file always sits at version/version.txt
. Right now, I need to create a git-flow-hooks-config.sh
in each repository to perform this customization.
I have the feeling that the VERSION_SORT
setting in git-flow-hooks-config.sh
isn't actually being used.
The implementation of https://github.com/jaspernbrouwer/git-flow-hooks/blob/master/modules/prevent-merge-marker-commits.sh is too simplistic.
It detects merge markers in binary files.
Is configuring these hooks something that everyone should do when cloning a repository where these hooks are to be used? Can I do this configuration only once?
Is it possible to create multiline tag messages? I'd like to introduce a new tag message variable to be replaced by a multiline text when finishing a release. Unfortunately all of the line breaks (\n) seem to get lost on the way from format-tag-message.sh to the actual tag message.
Maybe you can give me a push into the right direction ;-)
It seems as if the $VERSION_FILE
variable is not properly passed from bump-version.sh
to semverbump.sh
. It is always null / empty.
The result is, that the current version is actually never read from the version file, if a custom one has been specified in git-flow-hooks-config.sh
Thank a lot for this, been looking for a more efficient way to deal with versioning for quite a while now!
I realize this is not very active, but I was wondering if there's a way to implement two small modifications:
1. Prevent Interactivity
While making a release or a feature it stills asks me for a commit message.
I've seen a question in SO that said I could make something like:
export GIT_MERGE_AUTOEDIT=no
git flow release finish -m 'Merge Message' release_branch_name
unset GIT_MERGE_AUTOEDIT
But I don't understand how to apply something like this inside the hooks, without the message and without the release name (using auto bump). Any ideas?
2. Automatically push commits on the master
After I finish a release, I'm taken to the master
branch (using VSCode), and I can see that there are 2/3 commits to be pushed to origin. I was wondering if there would be way to automatically push after finishing a release/feature/hotfix.
Thanks a lot!
git commit messages should be in the imperative mood (source).
Please change the commit message when bumping the version number.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.