harbur / captain

Captain - Convert your Git workflow to Docker :whale: containers
MIT License
766 stars 51 forks source link

Creates master tag although its in a branch #80

Open estahn opened 5 years ago

estahn commented 5 years ago

I know this project is 💀 but we use it on some legacy repositories hence I'm reporting this.

When we use captain build in a branch, it creates a tag for master. The problem was introduced with the following commit:

https://github.com/harbur/captain/commit/29f59eba401ab06fe4849e7b739d883ae7210389

Example:

circleci@0d4777e529b0:~/project$ git symbolic-ref --short -q HEAD
staging-db-wip
circleci@0d4777e529b0:~/project$ git name-rev --name-only HEAD
master
dkapanidis commented 5 years ago

hi, althought there is no active development, potential issues will be checked upon.

I understand previous version worked ok and this is a regression for your environment.

estahn commented 5 years ago

@spiddy No, the feature was never used on that particular repository. After a year or so someone has created a branch with changes which broke the master image. Hence I wouldn't say it worked in previous versions.

This is in CircleCI 2.0 and latest git.

guilhem commented 5 years ago

We faced same problem. @estahn can you test this commit? https://github.com/yusofleet/captain/commit/a8f1f14578058b72acd00b6bfa6370af1bf12709 (fake release here: https://github.com/yusofleet/captain/releases/tag/v1.1.4 )