This repository contains pre-compiled assets for the FreeBSD
net-mgmt/prometheus2
Prometheus port.
It is not possible to build these with the rest of the port, as Yarn requires
Internet access to download various dependencies.
There may be multiple tags pointing at the same commit in this repository if the compiled assets do not change between Prometheus versions.
The following packages are required to build the assets:
Additionally, www/npm-node16
will be required. Currently, FreeBSD's npm
is v6, but this port requires v7+ to build the assets. So this port will just
be used to install a much newer npm
as part of makeassets.sh
.
Once the version of npm
in the port is updated, this stage will be removed.
The assets are built as follows:
- Check out the Prometheus repository and
cd
to the directory - Checkout the appropriate tag
- eg.
git checkout v2.14.0
- eg.
- Run
gmake assets
- Take the generated file and commit it to this repository under the same
path,
web/ui/assets_vfsdata.go
- Create a new tag that matches the version of Prometheus that the asset was
generated for
- eg.
git tag -m "Tagging v2.14.0" v2.14.0
- eg.
- Push the commits and tags to GitHub
git push && git push --tags
- Test and submit the updated
net-mgmt/prometheus2
port as usual
In addition to building the asset manually as shown above, there is a helper
script named makeasset.sh
. The script will perform the checkout of Prometheus
at a specified version, followed by the compilation of the asset, and copying
it into the correct location within the repository. Committing the asset to the
repository, tagging, and pushing the new version remain manual operations.