How do I seed version numbers for a channel?

I have recently come across the need to introduce a lot more channels than I have had so far, which I’ve been able to keep to two. In setting up the new channels on a projects I’ve chosen to experiment on, I noticed that using the Channel based version templates reset my version numbers, and yes, each channel needs its own version rules. The version templates looks like so:

#{Octopus.Version.Channel.LastMajor}.#{Octopus.Version.Channel.LastMinor}.#{Octopus.Version.Channel.LastPatch}.#{Octopus.Version.Channel.NextBuild}

If I can’t do this, it’s going to require a LOT of manual work to get this up and going. I hope you can help, but nothing is jumping out at me to make this easier. Thanks.

HI Michael,

Thanks for reaching out. I’m very sorry, but I read your reply a couple of times, and I can’t seem to fully understand what is it that you need.

Perhaps Its just the lack of my 5pm coffee, but could you explain this using an example or maybe tell my how it is now vs how you’d like it to be?

Thanks,
Dalmiro

Well, I’ve already gone through and did all the manual stuff for this go around.

What I was seeing was that when I created a new channel and then go to create a new release for that channel, that version template would come up 0.0.0.1. I was wanting a way to seed the major, minor, and so on versions. So, for the first release, I had to manually enter a number. With the number of projects we have and the number of channels we’ll be creating going forward, this will be no small amount of man hours devoted to setting up these channels. However we can cut down on that effort would make a huge impact in the aggregate.

Hi Michael,

That behavior is as design and it cannot be changed. If you want new channel’s initial version to have the same version as a specific channel when as soon they are created, you could script out their creation using our API. It’ll be something like this

  1. Create new channel
  2. Get latest release version of Channel X
  3. Create first release in new channel using the info from (2).

Best regards,
Dalmiro