Best convention: deploying multiple branches (GIT) of application

So I have an application:


In our Git repo we have 2 branches:

master & develop

Teamcity has a build configuration for the master branch which builds the application and updates the AssemblyInfo to:

$MAJOR.$MINOR.$teamcity buildcounter.$teamcity buildcounter

So octopack produces


This gets automatically deployed to our staging environment before being manually being pushed to prod

I’d like to create a second configuration built off the develop branch that creates automatically deploys to a test environment (the one with only dev DB access etc etc). Then once the development is complete the changes are merged into the master branch and committed, staged and prod ready.

However the packages names overlap with the existing packages so it’s not a great idea. In SVN it wouldn’t be an issue our version number would be:

$MAJOR.$MINOR.$teamcity revisionnumber.$teamcity buildcounter

But with Git we only have hashes for revision ids which can’t be used as assembly versions.

Any one been in the same spot? What did you do?

I’ve tried using the assemblyInfo patcher to update the AssemblyInformationalVersion but sadly after ‘Octopacking’ they still come out with the AssemblyVersion numbers

FWIW. After lots of messing around I got it to work.

OctoPack wouldn’t seem to do a nuget pack with the version number from AssemblyInformationalVersion so I substituted a NuGet Pack build step (after my build and before my Octopus Deploy) in team city and it created the right package.