I’m building a native app so I have a relatively involved CI pipeline that builds for Linux/Windows/Mac. In order to build for Mac I have to build on Mac because I need to link against SDKs that have ugly licenses. I’ve been building a Snap on Mac by using the
snapcore/snapcraft Docker image.
I can get the build working totally fine, but I’m struggling to get publishing working. I have a very simple script that let’s me invoke snapcraft:
docker run -v $PWD:/build -w /build --env SNAPCRAFT_STORE_CREDENTIALS snapcore/snapcraft:stable snapcraft $@
But the env variable doesn’t seem to get picked up. When I run
whoami I get the following error:
You need to first login to use this command.
Am I trying to do something that isn’t actually possible? Or am I missing something?