Snapshots
Get introduced to the snapshot() function and what it can do.
We'll cover the following
Preface
Sometimes, we have to package a project that hasn’t made an official release yet and only makes its git
repository available to us. In such cases, we need to define a snapshot()
function since it’s not allowed to clone the repository in an APKBUILD
to ensure reproducibility.
The snapshot()
function
This function is responsible for cloning the sources of a project, packaging them into a tarball, and uploading them to Alpine Linux servers. This way, it’s guaranteed that the tarball won’t change and that it won’t be deleted (as could happen in a git
repository via a force push). A typical snapshot()
function looks like this in an APKBUILD
:
Get hands-on with 1400+ tech skills courses.