We’re using snapshot testing in our app and it’s setup to only produce output when a snapshot doesn’t match which makes a test fail. I’ve been trying to deploy the folder that contains the images but it fails in the case where the test pass cause the folder doesn’t exist.
deploy failed, error: failed to create file artifact, error: failed to get file size, error: file not exist at: /tmp/SNAPSHOT_ARTIFACTS
So I tried making the folder in the case it didn’t exists and then got another error cause it failed when trying to zip it.
failed to zip output dir, error: command: (/usr/bin/zip "-rTy" "/var/folders/wp/4pf4qdmn217djs68lskdcc780000gn/T/__deploy-to-bitrise-io__271803799/SNAPSHOT_ARTIFACTS.zip" ".") failed, output: zip error: Nothing to do! (try: zip -rTy /var/folders/wp/4pf4qdmn217djs68lskdcc780000gn/T/__deploy-to-bitrise-io__271803799/SNAPSHOT_ARTIFACTS.zip . -i .), error: exit status 12
My solution ended up being to make the folder if it didn’t exist, them move it into another folder and use that folder as the deploy dir so it wasn’t trying to zip an empty folder. Seems like there should be an easier way.