Get build version from an external source
Is it possible to provide the build version from an external source?
For example, I would like to get the build version by looking at my project.json file. I was thinking something like this:
version: ps: $prjObj = (get-content src\MyApp\project.json) -join "`n" | ConvertFrom-Json; return "$($prjObj.version).{build}"
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 16 Oct, 2014 03:58 AM
This is what you need: http://www.appveyor.com/docs/build-worker-api#update-build-details
2 Posted by tugberk on 16 Oct, 2014 06:25 PM
nice, thx! at which stage should I run this powershell code? before the clone starts? do you have a .appveyor file example which uses this?
Support Staff 3 Posted by Feodor Fitsner on 16 Oct, 2014 06:29 PM
You can call it at any place of your build and any number of times.
4 Posted by gep13 on 17 Oct, 2014 07:06 AM
Note, you may also want to make use of this method:
http://www.appveyor.com/docs/build-worker-api#set-variable
Which would allow you to store the external build version as an environment variable, which can then be used in later build steps and scripts.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:49 AM.