Skip to content

Commit

Permalink
feat: update github push script (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
vnugent authored Jan 15, 2024
1 parent e25c856 commit 9cd3ba5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ pids
*.pid
*.seed
*.pid.lock
*.gz
*.geojson

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
Expand Down
19 changes: 13 additions & 6 deletions export-crag-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9cd3ba5

Please sign in to comment.