Sublime Forum

Output a zip file on bulid?

#1

I’d like to get the build process to output a zip file to a location I specify and of course exclude any files or directories i’ve excluded in the project settings. Is this possible?

I’m assuming this can somehow be done by passing 7zip a command line argument but it is beyond my skills. So far i’ve got this which says it’s incorrect…

build "C:\Program Files\7-Zip\7z.exe" "a C:\Users\me\Desktop\${ProjectName:Default}.Zip $ProjectDir -r"
lineNumberRegex ^(...*?):([0-9]*):?([0-9]*)
showWhenFinished true

codejacked.com/zip-up-files- … mand-line/

0 Likes

#2

Yep. But excluding the files i’ve told the project to ignore.

0 Likes

#3

No one know?

0 Likes

#4

The obvious solution seems to code a script (bat, shell, powershell, python…) that will do exactly what you want; I don’t think there’s any built-in functionality to do what you need. I believe build files simply run the executable they’re pointed to and output to the console. Point the build system to your script and its output would be visible there too.

Because you can pass the $ProjectDir location to your script, you can inspect the project file for the information you need and use it to exclude files, etc.

HTH,
Guillermo

0 Likes