Fixes these `npm install` warnings:
> deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
> deprecated eslint-loader@4.0.2: This loader has been deprecated. Please use eslint-webpack-plugin
This works better with the current eslint loader, as then eslint and
babel can look at the same configuration. See
<https://babeljs.io/docs/en/config-files>.
This is similar to .eslintrc.json.
This code comes from cockpit.git. Newer ESLint versions have a lot of
complaints about it, but in starter-kit we can't do anything about these
directly. Let's keep the stricter ESLint settings instead of ignoring a
lot more warnings to cover src/lib.
Teach `make dist-gzip` to print the tarball name as last line, and use
it as `create-archive` action.
Add a `make print-version` command which packit can use. The builtin
default only works if there is at least one git tag, which is not the
case for starter-kit (which is never released).
Copy and adjust the browser.sh and run-test.sh scripts from
cockpit-podman, which we have used in Fedora/RHEL dist-git gating and
packit tests for a while.
This field was introduced in
https://github.com/cockpit-project/cockpit/pull/4964 as "purely
informational for now", and isn't even parsed by cockpit.
package.json's version would only be relevant for publishing NPM
modules, but cockpit pages are not that.
Neither starter-kit itself nor our derived projects like cockpit-podman
or cockpit-composer have ever maintained these two fields, so just get
rid of them.
This makes the git tag the single source of truth for the version
number.
Fixes#200
It currently reacts to /livetest comments on PRs and builds cockpit from
the PR's checkout. Then serves it on logs.cockpit-project.org on a port
specified on a follow-up comment to the /livetest.
Cockpit developers can now utilize this workflow to review a PR without
having to pull and compile the code locally.
Without that, `npm run watch` is entirely silent after the first build,
and does not give any feedback when a build starts, and even more
importantly, when it's done.
This avoids the lengthy (and potentially brittle) installation of
dependencies and having to create an unprivileged user.
Since [1] the tasks container can now fix /dev/kvm permissions.
[1] https://github.com/cockpit-project/cockpituous/pull/366
Travis stopped handing out free credits since their plan changes last
November, so tests have not run since then.
Cirrus CI offers an API similar to Travis, and also explicitly supports
/dev/kvm access.
Eventually we want to use the cockpit/tasks container directly. But we
can't fix the /dev/kvm permissions inside that as `sudo` does not work
in that. Once we fix that, the setup will become much cheaper and
simpler.
Drop the cockpit-po-plugin.js and sassc-loader.js code copies, and check
them out from a stable cockpit tag, similarly to how we already get the
PatternFly CSS.
Convert the `po2json` script into a webpack plugin, and integrate the
(now trivial) po.empty.js template.
This is the last step for building the entire dist/ directory with
`npm run build` (i.e. a tool that web developers are familiar with),
and not having a split webpack+make toolchain any more.
`this.po` is not being used anywhere, so drop the whole `!loaded` code
path. There is no defer mechanism, so `po.js` *must* be loaded after
cockpit.js. Let's trigger a crash instead of silently dropping
translations, to make such a bug obvious in manual and automatic tests.
The output file is an option, not a positional argument.
`opts.args` is undefined if there are no positional arguments, so that
just calling `po/po2json` crashed with
TypeError: Cannot read property 'length' of undefined
Similarly to commit cbedf06704, provide default values, so that
`po2json po/de.po` does not error out with
Option "--module" requires 1 arguments, but 0 were provided
f1542d54db rewrote
the language selector dialog. Update the tests to also work with
cockpit ≥ 233.
Do the version comparison dynamically for the time being, as this breaks
several image refreshes. We can drop this again and only use the new
code once all of these landed.
Otherwise there is just too much noise and when something is broken, the
error is above 3 pages of pointless logs.
See https://webpack.js.org/configuration/stats/
Cherry-picked from cockpit-podman commit 5989b20a05a.
If so, show the versions, which may be useful for comparing builds. If
not, show an useful error message. Previously, you were left with ~ 80
identical unintelligible error messages and leftover temporary
directories.
Closes#404Fixes#391
GitHub's base VMs don't automatically refresh package indexes, so it can
happen that one of the package dependencies get out of date and are not
available on the mirrors any more.
Run `apt update` first to ensure that the workflow installs the latest
packages.