aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorevansiroky <evan.siroky@yahoo.com>2020-10-18 00:27:06 -0700
committerevansiroky <evan.siroky@yahoo.com>2020-10-18 00:27:06 -0700
commit7452c9b882c5ff0411be1882a2c13ba11c347859 (patch)
tree9c2d2d677076bdcee9837e3c610fbf1596b2e3d4
parent60ce0abe2577cb4e84824aa2162804468247b194 (diff)
downloadtimezone-boundary-builder-7452c9b882c5ff0411be1882a2c13ba11c347859.tar.gz
Junk directory names when zipping data for releases
-rw-r--r--CHANGELOG.md3
-rw-r--r--index.js10
2 files changed, 7 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9b0827..4889400 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,7 +10,8 @@
* Switch command line flag processing to use the yargs library. Existing flags have changed: --no-validation and --filtered-zones have been renamed to --no_validation and --included_zones respectively. --included_zones now takes a list without quotes or commas.
* Addition of new flags: --excluded_zones, --dist_dir, --downloads_dir, --skip_zip, --skip_shapefile. See --help and README.md for details.
-* Remove unneeded downloaded files from downloads directory before creating input data zipfile ([#82](https://github.com/evansiroky/timezone-boundary-builder/issues/82)).
+* Remove unneeded downloaded files from downloads directory before creating input data zipfile ([#82](https://github.com/evansiroky/timezone-boundary-builder/issues/82)).
+* Junk directory names when zipping data for releases
## 2020a
diff --git a/index.js b/index.js
index 9350354..88a10c4 100644
--- a/index.js
+++ b/index.js
@@ -788,7 +788,7 @@ const autoScript = {
}],
zipInputData: ['cleanDownloadFolder', function (results, cb) {
overallProgress.beginTask('Zipping up input data')
- exec('zip ' + distDir + '/input-data.zip ' + downloadsDir +
+ exec('zip -j ' + distDir + '/input-data.zip ' + downloadsDir +
'/* timezones.json osmBoundarySources.json expectedZoneOverlaps.json', cb)
}],
downloadLastRelease: ['makeDistDir', function (results, cb) {
@@ -829,7 +829,7 @@ const autoScript = {
overallProgress.beginTask('Zipping geojson')
const zipFile = distDir + '/timezones.geojson.zip'
const jsonFile = distDir + '/combined.json'
- exec('zip ' + zipFile + ' ' + jsonFile, cb)
+ exec('zip -j ' + zipFile + ' ' + jsonFile, cb)
}],
zipGeoJsonWithOceans: ['mergeZones', function (results, cb) {
if (argv.skip_zip) {
@@ -839,7 +839,7 @@ const autoScript = {
overallProgress.beginTask('Zipping geojson with oceans')
const zipFile = distDir + '/timezones-with-oceans.geojson.zip'
const jsonFile = distDir + '/combined-with-oceans.json'
- exec('zip ' + zipFile + ' ' + jsonFile, cb)
+ exec('zip -j ' + zipFile + ' ' + jsonFile, cb)
}],
makeShapefile: ['mergeZones', function (results, cb) {
if (argv.skip_shapefile) {
@@ -856,7 +856,7 @@ const autoScript = {
function (err, stdout, stderr) {
if (err) { return cb(err) }
const shapeFileZip = distDir + '/timezones.shapefile.zip'
- exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb)
+ exec('zip -j ' + shapeFileZip + ' ' + shapeFileGlob, cb)
}
)
}],
@@ -875,7 +875,7 @@ const autoScript = {
function (err, stdout, stderr) {
if (err) { return cb(err) }
const shapeFileZip = distDir + '/timezones-with-oceans.shapefile.zip'
- exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb)
+ exec('zip -j ' + shapeFileZip + ' ' + shapeFileGlob, cb)
}
)
}],