2018-03-07 11:11:57 +01:00
|
|
|
|
|
|
|
The tarball is generated via the OBS source service, but Grafana
|
|
|
|
needs to ship the compiled frontend assets as well, which have to
|
|
|
|
be built by running yarn and grunt inside the source tree (see
|
|
|
|
https://github.com/grafana/grafana#building-frontend-assets).
|
|
|
|
This can't be done at build time on OBS, because it involves
|
|
|
|
downloading and installing packages from the internet, so instead
|
|
|
|
we have a Makefile which does the following:
|
|
|
|
|
|
|
|
- Runs `osc service disabledrun` to get the latest source tarball
|
|
|
|
- Unpacks the tarball to a temporary directory
|
|
|
|
- Runs `yarn install --pure-lockfile && grunt release`
|
|
|
|
- Adds the generated "vendor" and "public" content to the tarball,
|
|
|
|
then compresses it with xz.
|
|
|
|
- The tarball can then be used by OBS to build an RPM.
|
|
|
|
|
2019-05-29 11:41:29 +02:00
|
|
|
In order for this to work you need to have npm >= 6, yarn and grunt
|
2018-03-07 11:11:57 +01:00
|
|
|
installed. To get set up, run:
|
|
|
|
|
2019-05-29 11:41:29 +02:00
|
|
|
# zypper in npm
|
2018-03-07 11:11:57 +01:00
|
|
|
# npm install -g yarn
|
|
|
|
# npm install -g grunt-cli
|
|
|
|
|
|
|
|
Then, to package a new release of Grafana, run `make` then `osc ci`
|
|
|
|
and you should be good.
|
|
|
|
|
|
|
|
Please direct any questions to Tim Serong <tserong@suse.com>
|