Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
web/ui/ | H | 02-Nov-2021 | - | 1,189 | 1,057 | |
.gitignore | H A D | 02-Nov-2021 | 78 | 7 | 5 | |
README.md | H A D | 02-Nov-2021 | 2.2 KiB | 57 | 46 | |
makeasset.sh | H A D | 02-Nov-2021 | 1.8 KiB | 85 | 58 |
README.md
1# `net-mgmt/prometheus2` assets 2 3This repository contains pre-compiled assets for the [FreeBSD] 4[`net-mgmt/prometheus2`] [Prometheus] port. 5It is not possible to build these with the rest of the port, as [Yarn] requires 6Internet access to download various dependencies. 7 8There may be multiple tags pointing at the same commit in this repository if 9the compiled assets do not change between Prometheus versions. 10 11## Required Packages 12 13The following packages are required to build the assets: 14 15 - [`devel/gmake`] 16 - [`lang/go`] 17 - [`www/node10`] 18 - [`www/yarn-node10`] 19 20## Building the Assets 21 22The assets are built as follows: 23 24 - Check out the [Prometheus repository] and `cd` to the directory 25 - Checkout the appropriate tag 26 - eg. `git checkout v2.14.0` 27 - Run `gmake assets` 28 - This will compile the [React] UI and generate a [Go] file at 29 `web/ui/assets_vfsdata.go` 30 - Take the generated file and commit it to this repository under the same 31 path, `web/ui/assets_vfsdata.go` 32 - Create a new tag that matches the version of Prometheus that the asset was 33 generated for 34 - eg. `git tag -m "Tagging v2.14.0" v2.14.0` 35 - Push the commits and tags to GitHub 36 - `git push && git push --tags` 37 - Test and submit the updated `net-mgmt/prometheus2` port as usual 38 39In addition to building the asset manually as shown above, there is a helper 40script named `makeasset.sh`. The script will perform the checkout of Prometheus 41at a specified version, followed by the compilation of the asset, and copying 42it into the correct location within the repository. Committing the asset to the 43repository, tagging, and pushing the new version remain manual operations. 44 45<!-- document links --> 46[`devel/gmake`]: https://www.freshports.org/devel/gmake 47[`lang/go`]: https://www.freshports.org/lang/go 48[`net-mgmt/prometheus2`]: https://github.com/freebsd/freebsd-ports/tree/master/net-mgmt/prometheus2 49[`www/node10`]: https://www.freshports.org/www/node10 50[`www/yarn-node10`]: https://www.freshports.org/www/yarn-node10 51[FreeBSD]: https://www.freebsd.org/ 52[Go]: https://golang.org/ 53[Prometheus]: https://prometheus.io/ 54[Prometheus repository]: https://github.com/prometheus/prometheus 55[React]: https://reactjs.org/ 56[Yarn]: https://yarnpkg.com/ 57