How to overwrite a existing release with same version?


For every checkin in github repo…we are auto deploying our code to Dev environment using Teamcity octopus plugin. I am using current date as (2015.10.07) octopus release number for every deployment. I would like to overwrite the existing release If its already there, Is it possible to do this? I see a option to -ignoreexisting but couldn’t find one to overwrite it. Could you please let me know what would be the better solution to handle this scenario?



Thanks for reaching out. It’s not possible to overwrite a release like you want to, and that’s as designed.

Using dates as release versions is simply a very bad practice. A release number should follow the semver conventions to avoid running into scenarios like this one. This way you’d make sure that each time you push code to github, a new build gets created (with a new build number), which will create a release in Octopus with the version format MAJOR.MINOR.PATCH.BUILD where BUILD is your build number (which will always be different).



Thank you Dalmiro.

I have one more question…How to ensure that nuget package is downloaded from nuget server every time we deploy it to a server? I tried using --forcepackagedownload but it still uses the nuget package from cache instead of bringing it down again.



Hi Ram,

You need to make sure that there’s a newer version of the package in the repository. If you deploy the release 1.0.0 using the package MyApp.1.0.0, and then you try to deploy release 2.0.0 using the same Myapp.1.0.0, Octopus will use the copy of the package in the cache regardless if the content of the package has changed.

Hope tha helps,