Environment Variable as tag name
Hello, i started using AppVeyor for deploying an Electron App to Github Releases, so, for getting the version name, i'm doing:
before_deploy:
- sh: export VERSION="$(node -p "require('./package.json').version")"
deploy:
- tag: $(VERSION)
provider: GitHub
on:
branch: master
No matter if i use $(VERSION)
, ${VERSION}
or %VERSION%
it would not transpile my env var properly, how this can be achieved?
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
1 Posted by Ilya Finkelshte... on 24 Jan, 2019 11:21 PM
Thanks for the report. Seems like a bug. Tracking it here. As a workaround, please move
export VERSION
toafter_build
orbuild_script
script or any other stage which happens earlier than deployment. Also I would recommend addingecho $VERSION
afterexport VERSION
to ensure value is OK.2 Posted by nahuel on 24 Jan, 2019 11:26 PM
I'll give it a try, aside of that, which of the three ways of replacing values with env variables is the correct on the appveyor.yml file?
3 Posted by Ilya Finkelshte... on 25 Jan, 2019 02:13 AM
All 3 (
$(VERSION)
,${VERSION}
and%VERSION%
) will work.4 Posted by nahuel on 25 Jan, 2019 04:38 AM
I think that the problem rely on me trying to use sh scrips on a windows build, i was expecting to being processed using git bash or WSL, but in fact they're ignored at all. By replacing them with proper batch commands everything worked properly
5 Posted by Ilya Finkelshte... on 25 Jan, 2019 08:45 AM
Ah it was Windows build :) But you helped find a bug in Linux build agent!
Ilya Finkelshteyn closed this discussion on 27 Mar, 2019 09:00 PM.