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.
With [1] the release container moved from dockerhub to GitHub's
container registry, as we both build and use it from GitHub. This avoids
running into docker.io pull limits.
[1] https://github.com/cockpit-project/cockpituous/pull/353Closes#398
As `files` is now the only entry in `info`, rename it to a `copy_files`
constant, and drop `info` completely.
Drop the "qualify" loop and add the src/ subdirectory to the path
directly. This is more explicit, thus easier to understand, and simpler.
Drop the now unused "vpath" function.
Drop the "qualify" loop and add the src/ subdirectory to the path
directly. This is more explicit, thus easier to understand, and simpler.
Also move it into the `modules` declaration directly, so that (1) it's
easier to see what it actually means, and (2) info.files is for a
completely different purpose.
This is simple enough to be inline, and it's also not meant to be
expanded: `cockpit` is the only legit external symbol, everything else
ought to be bundled.
The default of `path` and `sourceMapFilename` are already what we want,
no need to set them explicitly.
The `output.filename` is already `[name].js`, and it's totally not
important to name the file differently in production mode (it will then
just be `index.js.gz`, compared to index.js in development mode).
Travis now offers /dev/kvm, and its machines are powerful enough to run
our browser integration tests, at least for small projects.
Building an RPM on the Ubuntu host environment is a bit tricky, as there
are no installed RPMs. Thus ignore the BuildRequires, and install
appstream-util explicitly. In the future, the rpm/deb build should
happen inside the VM (like Cockpit does).
Add two scenarios for current Fedora and CentOS 8.
Switch to the "minimal" environment to make the test easier to reproduce
locally and more explicit.
Closes#386
node-sass is a compiled ELF module, which is problematic for
distributions that want to rebuild everything from source. The sassc CLI
program is packaged everywhere, and both use the same libsass library.
So drop node-sass and sass-loader, and replace it with a simple loader
wrapper around sassc.
This also saves 122 npm packages (16 MB in node_modules/).
Closes#382
This avoids a lot of moving parts in our infrastructure (webhook,
npm-trigger roundtrip, tasks container), works in exactly the same way
for independent third-party projects, and does not need *any* secret
other than the automatically provided GitHub token.
Let this run early every morning, roughly similar frequency as
cockpituous used to do. Also add a manual trigger, so that we get a
button to run it on demand.
Closes#384
Enter the new world of GitHub actions [1]/GitLab pipelines [2]. This
simplifies our end of the infrastructure considerably:
* No need any more to set up webhooks, all the relevant configuration
is right in the workflow file.
* Does not need any infrastructure on our side any more, and thus works
for third-party projects. They just need to set up their own secrets.
* GitHub automatically provides a temporary `GITHUB_TOKEN` with
sufficient write access to the project to publish a release, so we
don't need to carry around that secret. Thus if your project only
releases to GitHub, there is zero secrets management.
Also adjust cockpituous-release a bit (update Fedora version, fix
project name copy-pasta), point to the action workflow and necessary
secrets.
Closes#380
The current version failed with
Option "--directory" requires 1 arguments, but 0 were provided
In the current stdio npm module version, getopt() now requires a
`default:` attribute, otherwise it considers the options as required.
Also sync PO helpers with current cockpit.
Add PO template build to travis check, to make sure that it keeps
working.
Closes#375
compression-webpack-plugin fixes https://www.npmjs.com/advisories/1548
Adjust to new copy-webpack-plugin API.
Thew new modules now create dist/index.html.gz in `NODE_ENV=production`
mode, so switch `WEBPACK_TEST` to index.css instead (which remains
uncompressed in both modes).
We previously made directories depend on files for the synthetic
serialization of git commands. git does not track directories, and
time stamps across repos (starter-kit vs. bots) work rather poorly --
for example, this broke "bots" being a symlink to a previously existing
checkout.
Use file locking instead, which is a more direct way of ensuring that
there is only one git operation that affects the current checkout. We
don't need to flock bots/, as that's an independent git repository.
Closes#371