I'm developing a Windows-based application where I'm trying to automate the deployment process to a website hosting that software. After some research on the matter, it seems that the easiest way is the following:
- Use a custom build step leveraging Windows Powershell.
- Run a Powershell script to copy, zip, and fire off a web request.
- Said web request will arrive on the REST-ful API online and upload and make the new release available.
I've run into a little snag with Visual Studio 2013 however. How do I add an optional build step? I.e. one that only triggers (and publishes/uploads the software) when I want it to?
I've tried creating a new Configuration called 'Publish' which seemed promising, until I realized some of my dynamically linked libraries are in separate 'debug' and 'release' folders, so I rely on things like $(ConfigurationName) to differentiate between the two. So adding a third configuration/name in the mix is something I wish to avoid.
I'd prefer a solution where the Visual Studio GUI could let 'upload/publish' action be toggled on/off, but I'll settle with an approach that is toggled on/off with a #define somewhere in the code. Perhaps someone could point me in the right direction?
Much appreciated!
Aucun commentaire:
Enregistrer un commentaire