Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Clean up build scripts and remove outdated python references

Jo Spraguee7edfc1b6024
diff --git a/Gruntfile.js b/Gruntfile.js
index 1becb08a0..c6fd3391d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -427,9 +427,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-rename');
- // Lets use 'clean' as a target instead of the name of the task
- grunt.renameTask('clean', 'remove');
-
grunt.registerTask('load_branding', 'Load branding', function () {
var brand = grunt.file.readJSON('build/options/brand.json');
brand.officialName = brand.officialName || brand.name;
@@ -446,10 +443,10 @@ module.exports = function(grunt) {
});
grunt.registerTask('build', [
- 'remove:build_source',
+ 'clean:build_source',
'git-rev-parse:source',
'copy:source',
- 'remove:source',
+ 'clean:source',
'exec:empty',
'copy:release',
'mkdir:dist',
@@ -460,9 +457,9 @@ module.exports = function(grunt) {
]);
grunt.registerTask('config', [
- 'remove:build_config',
+ 'clean:build_config',
'git-rev-parse:config',
- 'remove:config_src',
+ 'clean:config_src',
'markdown',
'copy:config_src',
'copy:brand_info',
@@ -473,7 +470,7 @@ module.exports = function(grunt) {
grunt.registerTask('site', [
'load_branding',
- 'remove:build_site',
+ 'clean:build_site',
'copy:site',
'replace:tokens',
'exec:tar_site_debug',
@@ -485,18 +482,16 @@ module.exports = function(grunt) {
grunt.registerTask('rpm-only', [
'load_branding',
'git-rev-parse:source',
- 'remove:rpmbuild',
+ 'clean:rpmbuild',
'mkdir:rpmbuild',
'copy:rpm_sources',
'replace:rpm_sources',
- 'remove:dist_rpm',
+ 'clean:dist_rpm',
'exec:rpmbuild',
'copy:rpm'
]);
grunt.registerTask('apache-config', ['load_branding', 'copy:apache', 'replace:apache']);
- grunt.registerTask('clean', ['remove:build']);
- grunt.registerTask('distclean', ['remove:build', 'remove:dist']);
grunt.registerTask('default', [
'build',
diff --git a/config.sh b/config.sh
index 42d73e6b1..a1ce43b5d 100644
--- a/config.sh
+++ b/config.sh
@@ -1,31 +1,32 @@
#!/bin/bash
- echo "installing npm dependencies"
- if ! npm install ; then
- echo "ERROR: \"npm install\" failed" &>2
- exit 1
- fi
- echo "setting up Python environment"
- if ! ./wv-python ; then
- echo "ERROR: \"./wv-python\" failed" &>2
- exit 1
- fi
- echo "Cleaning dist"
- if ! grunt distclean ; then
- echo "ERROR: \"grunt distclean\" failed" &>2
- exit 1
- fi
- echo "relocation node_module dependencies"
- if ! grunt update ; then
- echo "ERROR: \"grunt update\" failed" &>2
- exit 1
- fi
- echo "Fetching GetCapabilities"
- if ! grunt fetch ; then
- echo "ERROR: \"grunt fetch\" failed" &>2
- exit 1
- fi
- echo "Generating Configuration"
- if ! grunt config ; then
- echo "ERROR: \"grunt config\" failed" &>2
- exit 1
- fi
+
+echo "installing npm dependencies"
+if ! npm install ; then
+ echo "ERROR: \"npm install\" failed" &>2
+ exit 1
+fi
+echo "Cleaning build"
+if ! grunt clean:build ; then
+ echo "ERROR: \"grunt clean:build\" failed" &>2
+ exit 1
+fi
+echo "Cleaning dist"
+if ! grunt clean:dist ; then
+ echo "ERROR: \"grunt clean:dist\" failed" &>2
+ exit 1
+fi
+echo "Fetching GetCapabilities"
+if ! npm run getcapabilities ; then
+ echo "ERROR: \"npm run getcapabilities\" failed" &>2
+ exit 1
+fi
+echo "Fetching GetCapabilities"
+if ! npm run build:config ; then
+ echo "ERROR: \"npm run build:config\" failed" &>2
+ exit 1
+fi
+echo "Generating Configuration"
+if ! grunt config ; then
+ echo "ERROR: \"grunt config\" failed" &>2
+ exit 1
+fi
diff --git a/master.sh b/master.sh
index 42601aa74..4486ba136 100644
--- a/master.sh
+++ b/master.sh
@@ -1,38 +1,27 @@
#!/bin/bash
- echo "installing npm dependencies"
- if ! npm install ; then
- echo "ERROR: \"npm install\" failed" &>2
- exit 1
- fi
- echo "setting up Python environment"
- if ! ./wv-python ; then
- echo "ERROR: \"./wv-python\" failed" &>2
- exit 1
- fi
- echo "Cleaning dist"
- if ! grunt distclean ; then
- echo "ERROR: \"grunt distclean\" failed" &>2
- exit 1
- fi
- echo "relocation node_module dependencies"
- if ! grunt update ; then
- echo "ERROR: \"grunt update\" failed" &>2
- exit 1
- fi
- echo "Generating build"
- if ! grunt build ; then
- echo "ERROR: \"grunt build\" failed" &>2
- exit 1
- fi
- echo "starting lint report. Results in lint-results.xml"
- grunt jshint:report | ./bin/filter-test-report > lint-results.xml
- if ! grunt lint ; then
- echo "ERROR: \"grunt test\" failed" &>2
- exit 1
- fi
- echo "executing unit tests. Results in test-results.xml"
- grunt buster:report | ./bin/filter-test-report > test-results.xml
- if ! grunt test ; then
- echo "ERROR: \"grunt test\" failed" &>2
- exit 1
- fi
+
+echo "installing npm dependencies"
+if ! npm install ; then
+ echo "ERROR: \"npm install\" failed" &>2
+ exit 1
+fi
+echo "Cleaning build"
+if ! grunt clean:build ; then
+ echo "ERROR: \"grunt clean:build\" failed" &>2
+ exit 1
+fi
+echo "Cleaning dist"
+if ! grunt clean:dist ; then
+ echo "ERROR: \"grunt clean:dist\" failed" &>2
+ exit 1
+fi
+echo "Generating build"
+if ! npm run build ; then
+ echo "ERROR: \"npm run build\" failed" &>2
+ exit 1
+fi
+echo "Generating build"
+if ! grunt build ; then
+ echo "ERROR: \"grunt build\" failed" &>2
+ exit 1
+fi
diff --git a/site_build.sh b/site_build.sh
index b2f868cf1..fc1ff4fe0 100644
--- a/site_build.sh
+++ b/site_build.sh
@@ -1,35 +1,26 @@
#!/bin/bash
- echo "Copying Config Artifacts to dist"
- mkdir -p dist
- cp build/worldview-config* dist
- echo "Unpacking Build Artifacts"
- ( cd build && \
- tar xf worldview.tar.bz2 && \
- tar xf worldview-debug.tar.bz2 && \
- tar xf worldview-config.tar.bz2
- )
- echo "installing npm dependencies"
- if ! npm install ; then
- echo "ERROR: \"npm install\" failed" &>2
- exit 1
- fi
- echo "setting up Python environment"
- if ! ./wv-python ; then
- echo "ERROR: \"./wv-python\" failed" &>2
- exit 1
- fi
- echo "relocation node_module dependencies"
- if ! grunt update ; then
- echo "ERROR: \"grunt update\" failed" &>2
- exit 1
- fi
- echo "Generating site via 'grunt site'"
- if ! grunt site ; then
- echo "ERROR: \"grunt site\" failed" &>2
- exit 1
- fi
- echo "Generating rpm via 'grunt rpm-only'"
- if ! grunt rpm-only ; then
- echo "ERROR: \"grunt rpm-only\" failed" &>2
- exit 1
- fi
+
+echo "Copying Config Artifacts to dist"
+mkdir -p dist
+cp build/worldview-config* dist
+echo "Unpacking Build Artifacts"
+( cd build && \
+ tar xf worldview.tar.bz2 && \
+ tar xf worldview-debug.tar.bz2 && \
+ tar xf worldview-config.tar.bz2
+)
+echo "installing npm dependencies"
+if ! npm install ; then
+ echo "ERROR: \"npm install\" failed" &>2
+ exit 1
+fi
+echo "Generating site via 'grunt site'"
+if ! grunt site ; then
+ echo "ERROR: \"grunt site\" failed" &>2
+ exit 1
+fi
+echo "Generating rpm via 'grunt rpm-only'"
+if ! grunt rpm-only ; then
+ echo "ERROR: \"grunt rpm-only\" failed" &>2
+ exit 1
+fi
diff --git a/tasks/buildCSS.js b/tasks/buildCSS.js
index 13e87ab1e..de47778c4 100644
--- a/tasks/buildCSS.js
+++ b/tasks/buildCSS.js
@@ -4,7 +4,6 @@ const postcss = require('postcss');
const postcssImport = require('postcss-import');
const url = require('postcss-url');
const autoprefixer = require('autoprefixer');
-const stylelint = require('stylelint');
const cssnano = require('cssnano');
const entryPoint = 'web/css/main.css';
@@ -13,7 +12,7 @@ const outputPath = outputDir + 'wv.css';
fs.readFile(entryPoint, (err, css) => {
if (err) console.log(err);
- postcss([postcssImport, autoprefixer, stylelint, cssnano])
+ postcss([postcssImport, autoprefixer, cssnano])
.use(url({
url: 'copy',
assetsPath: 'assets/css'
diff --git a/wv-python b/wv-python
deleted file mode 100755
index d661e4d82..000000000
--- a/wv-python
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-set -e
-
-BASE_DIR=$(dirname "$0")
-
-( \
- cd $BASE_DIR; virtualenv python ; python/bin/pip install \
- xmltodict \
- isodate \
-)
diff --git a/wv-setup b/wv-setup
index 0bfe223dc..5ad4e6cfd 100755
--- a/wv-setup
+++ b/wv-setup
@@ -61,11 +61,6 @@ if [ ! -e "/usr/local/bin/virtualenv" ] ; then
sudo easy_install virtualenv==1.10.1
fi
-if [ ! -d "$BASE_DIR/python" ] ; then
- echo "$PROG: ***** Installing python dependencies"
- "$BASE_DIR"/wv-python
-fi
-
if [ ! -d "$BASE_DIR/options" ] ; then
echo "$PROG: ***** Fetching options"
if [ "$WORLDVIEW" ] ; then