Currently, when running the yak command, it will only specify into the folder that the command is running.
While I’m using a self-made script to package my GH plugin, add additional icons into the manifest.yml file, etc., the yak command will also package my script into the yak folder.
Is there any approach to specify a target folder to inspect?
I tried yak spec --input "<targetFolder>", but it cannot find a .gha file and returns:
But when inspecting in that folder, everything works.
Alternatively, it seems .yak file is just a .zip file (not sure if this is correct). If that’s the case, I can manually create the zip file instead of using yak build?
Is there a reason that you can’t run the yak CLI from the directory containing the files that you want to package?
Here’s the powershell build step that packages our Hops plug-in.
# get yak.exe (see https://developer.rhino3d.com/guides/yak/yak-cli-reference/#downloads)
curl.exe -fSLo yak.exe https://files.mcneel.com/yak/tools/0.13.0/yak.exe
.\yak.exe version
# build package distribution
cd src\dist
..\..\yak.exe build
If it’s part of a larger script, you might need to cd back to the original directory afterwards.
And to echo what Callum said, we’ve run into problems extracting packages that were created or edited manually. Using the yak CLI is recommended.
I have a complex project that mix c#, cpp and use a script to copy essential files into one folder and pack them.
The yak command currently pack everything in the target folder, containing my powershell script, which I don’t want.
So I want to run it in a separate folder that only contains the files I want to pack – This is also the reason I ask if I can use separate program to pack it.
This is actually what I’d recommend. Prior to running yak build, your script could copy the correct files into a clean directory. (You could copy everything and delete specific files, such as the script itself, if easier.)
In my PowerShell example above, “src\dist” is a directory that contains only the files that are to be packaged up. Earlier steps of our build process ensure that “src\dist” is clean and only the correct files are copied into this directory.