diff --git a/.gitignore b/.gitignore index 17550172..e54f7667 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,8 @@ pids *.pid *.seed *.pid.lock +*.gz +*.geojson # Directory for instrumented libs generated by jscoverage/JSCover lib-cov diff --git a/export-crag-data.sh b/export-crag-data.sh index 53799988..e3bd1747 100755 --- a/export-crag-data.sh +++ b/export-crag-data.sh @@ -6,17 +6,24 @@ then exit 1 fi -echo "cloning openbeta-export repository" -git clone --depth 1 --branch production https://ob-bot-user:${GITHUB_ACCESS_TOKEN}@github.com/OpenBeta/openbeta-export || exit 1 -git config user.name "db-export-bot" -git config user.email "db-export-bot@noreply" -cd .. - echo "start exporting CRAG data..." yarn export-crags +ZIP_FILE=crags.geojson.gz + +tar -czf ${ZIP_FILE} crags.geojson crag-groups.geojson + echo "... finished export. Committing data..." +echo "cloning openbeta-export repository" +git clone --depth 1 --branch production https://ob-export-user:${GITHUB_ACCESS_TOKEN}@github.com/OpenBeta/openbeta-export.git || exit 1 + +cd openbeta-export +git config user.name "ob-export-user" +git config user.email "db-export-bot@noreply" + +mv ../${ZIP_FILE} . + git add -A git commit -am "export crag data" git push origin production