Modify contents of output folder before artifact is packaged
In short, I have a PS script executed after_build which I use to create/modify files in MSBuild's output folder.
However, these files are not included in the resulting artifact. It seems the artifact is created before the after_build event.
I'm copying the new files using PowerShell to the output folder using a path like:
"$env:APPVEYOR_BUILD_FOLDER\name-of-project-built\obj\$env:CONFIGURATION\Package\PackageTmp\
However, since the artifact zip file seems to have already been created at this point, the new files do not appear in it.
Is there a recommended approach to modifying the output of the build before the artifact is created?
Or do I have to add the files manually to the artifact zip file in after_build? I've looked into that, but the $artifacts variable seems to be null in after_build, even though the artifact has obviously been created.
I've also looked at the $artifacts property in before_deploy, but I can't figure out how to resolve the path to the artifact zip in order to be able to add files to it.
Not sure how well I'm phrasing this question... :)
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 Ted on Dec 29, 2016 @ 03:05 PM
Just noticed there's a before_package event, I'll try that one. :)
Edit: Nope, that does not appear to work. Tried copying to the output directory like before, but the files are still not included in the artifact.
Ted closed this discussion on Dec 29, 2016 @ 03:44 PM.