zenflow
zenflow copied to clipboard
project configured with release_branch: false will try to use the branch "false"
┌[12:09:25 -0400 EDT 2015-10-06] jmiller@jmiller-imac:~/work/jmiller/zenflow-test
└[imac] (master) $ cat .zenflow
---
project: zenflow-test
development_branch: master
staging_branch: false
qa_branch: false
release_branch: false
merge_strategy: merge
remote: origin
backup_remote: false
confirm_staging: false
confirm_review: true
but when doing a release:
┌[12:14:14 -0400 EDT 2015-10-06] jmiller@jmiller-imac:~/work/jmiller/zenflow-test
└[imac] (release/zenflow-test-0001) $ zenflow release finish
>> Has this been code reviewed yet? [Y/n]
-----> Updating the master branch
$ git checkout master && git pull
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
Already up-to-date.
-----> Switching to the release/zenflow-test-0001 branch
$ git checkout release/zenflow-test-0001
Switched to branch 'release/zenflow-test-0001'
Your branch is up-to-date with 'origin/release/zenflow-test-0001'.
-----> Merging in the master branch
$ git merge --no-ff master
Already up-to-date.
$ git add VERSION.yml && git commit -a -m 'Bumping version to 0.4.0.'
[release/zenflow-test-0001 2809299] Bumping version to 0.4.0.
1 file changed, 2 insertions(+), 2 deletions(-)
>> Add one line to the changelog: things
-----> Managing changelog for version 0.4.0 / 2015-10-06 / zenflow-test-0001
$ git add CHANGELOG.md && git commit -a -m 'Adding line to CHANGELOG: * things'
[release/zenflow-test-0001 fc42a4b] Adding line to CHANGELOG: * things
1 file changed, 3 insertions(+)
-----> Switching to the master branch
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
-----> Merging in the release/zenflow-test-0001 branch
$ git merge --no-ff release/zenflow-test-0001
Merge made by the 'recursive' strategy.
CHANGELOG.md | 3 +++
VERSION.yml | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
-----> Pushing the master branch to origin
$ git push origin master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 735 bytes | 0 bytes/s, done.
Total 7 (delta 5), reused 0 (delta 0)
To [email protected]:jmiller/zenflow-test.git
3b0ef22..4066ea4 master -> master
-----> Switching to the false branch
$ git checkout false
error: pathspec 'false' did not match any file(s) known to git.
-----> Process aborted
-----> Exit status: pid 96471 exit 1
-----> You may need to run any following commands manually...
-----> Merging in the release/zenflow-test-0001 branch
$ git merge --no-ff release/zenflow-test-0001
-----> Pushing the false branch to origin
$ git push origin false
-----> Tagging the release
$ git tag -a '0.4.0' -m 'things'
-----> Pushing tags to origin
$ git push origin --tags
-----> Removing the remote branch from origin
$ git branch -r | grep origin/release/zenflow-test-0001 && git push origin :release/zenflow-test-0001 || echo ''
-----> Removing the local branch
$ git branch -D release/zenflow-test-0001
tl;dr: if release_branch is set to false, it's parsed as a string from the config, despite being a "magic" (boolean) value, causing some slightly unexpected behavior.
a reasonable expectation would be an error message something like "you're not allowed to do that given how your project is configured; set release_branch:
@BCjmiller I was working on some similar stuff in another PR/issue https://github.com/zencoder/zenflow/pull/34
whoops, should have checked other issues more closely. i'll close as a dupe.
@BCjmiller not sure we necessarily need to close this one out. They're very similar, but slightly different issues. I was just pointing you at my started solution since I haven't had a chance to circle back to it yet. Thought you might want to pick it up and run with it! :smile: