Dist using git ls-files

This makes sure we always include all files in the repository when
disting.

Obsoletes webpack-with-stats, which had a bug anyway: it wasn't
reporting jslint errors.
This commit is contained in:
Lars Karlitski 2017-10-18 19:04:18 +02:00
parent bd26aeda57
commit 1b003462ca
4 changed files with 2 additions and 33 deletions

1
.gitignore vendored
View file

@ -3,4 +3,3 @@
node_modules/ node_modules/
dist/ dist/
/.vagrant /.vagrant
/webpack.inputs

View file

@ -15,19 +15,10 @@ install-only:
mkdir -p $(DESTDIR)/usr/share/metainfo/ mkdir -p $(DESTDIR)/usr/share/metainfo/
cp org.cockpit-project.$(PACKAGE_NAME).metainfo.xml $(DESTDIR)/usr/share/metainfo/ cp org.cockpit-project.$(PACKAGE_NAME).metainfo.xml $(DESTDIR)/usr/share/metainfo/
EXTRA_DIST = \
README.md \
org.cockpit-project.$(PACKAGE_NAME).metainfo.xml \
package.json \
.eslintrc.json \
webpack.config.js \
webpack-with-stats \
Makefile
# when building a distribution tarball, call webpack with a 'production' environment # when building a distribution tarball, call webpack with a 'production' environment
dist-gzip: NODE_ENV=production dist-gzip: NODE_ENV=production
dist-gzip: clean all dist-gzip: clean all
tar czf $(PACKAGE_NAME)-cockpit.tar.gz --transform 's,^,$(PACKAGE_NAME)-cockpit/,' $$(cat webpack.inputs) $(EXTRA_DIST) dist/ tar czf $(PACKAGE_NAME)-cockpit.tar.gz --transform 's,^,$(PACKAGE_NAME)-cockpit/,' $$(git ls-files) dist/
srpm: dist-gzip srpm: dist-gzip
rpmbuild -bs \ rpmbuild -bs \

View file

@ -7,7 +7,7 @@
"author": "", "author": "",
"license": "LGPL-2.1", "license": "LGPL-2.1",
"scripts": { "scripts": {
"build": "./webpack-with-stats" "build": "webpack"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "^6.25.0", "babel-core": "^6.25.0",

View file

@ -1,21 +0,0 @@
#!/usr/bin/env node
var path = require('path');
var fs = require('fs');
var process = require('process');
var webpack = require('webpack');
var config = require('./webpack.config.js');
webpack(config, function (err, stats) {
if (err) {
console.log(JSON.stringify(err));
process.exit(1);
return;
}
var inputs = [ ];
stats.compilation.fileDependencies.forEach(function(file) {
inputs.push(path.relative(process.cwd(), file));
});
fs.writeFileSync('webpack.inputs', inputs.join("\n") + "\n");
});