Setting environment variables from within snapcraft.yaml
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Mon Mar 20 21:09:25 UTC 2017
Hello folks,
Is it possible to set environment variables to be used when creating a part of a
snap?
I guess one could use the `prepare:` scriptlet to do something like `export
MY_VAR=whatever` but I'd like the environment variable to be set before I even
pull the source. (If you're wondering why: I'm considering whether I can use
git environment variables to work around the launchpad-buildd constraints on
support for git:// URLs.)
I'm not seeing anything relevant in https://snapcraft.io/docs/build-snaps/parts,
hence why I ask here.
Thanks & best wishes,
-- Joe
More information about the Snapcraft
mailing list