Ammonite
Ammonite copied to clipboard
Allow building from release archive
Add support for RELEASE_ARCHIVE_VERSION environment variable to build.sc.
If RELEASE_ARCHIVE_VERSION is set, it assumes, that build is performed from the
release source archive and does not invoke git command, which otherwise would result
in fatal: not a git repository error.
RELEASE_ARCHIVE_VERSION should be set to the source archive version, e.g:
$ RELEASE_ARCHIVE_VERSION=2.3.8 mill -i amm[2.13.3].assembly
Addresses issue #1130
@rolisv Would it work for you if the version would default to a literal X.Y.Z instead of requiring users to set RELEASE_ARCHIVE_VERSION? This shouldn't be much of a problem, unless you're actually packaging Ammonite for your own needs from the source archive?
@alexarchambault It would work, if that literal is set only in release archive tarball. We need some kind of marker in build.sc to know that we are building from release archive and not invoke git commands.
Arch Linux builds Ammonite from release archive sources and runs a bunch of sed scripts to "butcher" build.sc into not running any git commands. But if build.sc changes, those sed scripts need to be updated. The goal here is to be able to build Ammonite from a release archive without needing to patch it first.