Skip to content

Commit 9cd3ba5

Browse files
authored
feat: update github push script (#381)
1 parent e25c856 commit 9cd3ba5

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ pids
1515
*.pid
1616
*.seed
1717
*.pid.lock
18+
*.gz
19+
*.geojson
1820

1921
# Directory for instrumented libs generated by jscoverage/JSCover
2022
lib-cov

export-crag-data.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,24 @@ then
66
exit 1
77
fi
88

9-
echo "cloning openbeta-export repository"
10-
git clone --depth 1 --branch production https://ob-bot-user:${GITHUB_ACCESS_TOKEN}@github.com/OpenBeta/openbeta-export || exit 1
11-
git config user.name "db-export-bot"
12-
git config user.email "db-export-bot@noreply"
13-
cd ..
14-
159
echo "start exporting CRAG data..."
1610
yarn export-crags
1711

12+
ZIP_FILE=crags.geojson.gz
13+
14+
tar -czf ${ZIP_FILE} crags.geojson crag-groups.geojson
15+
1816
echo "... finished export. Committing data..."
1917

18+
echo "cloning openbeta-export repository"
19+
git clone --depth 1 --branch production https://ob-export-user:${GITHUB_ACCESS_TOKEN}@github.com/OpenBeta/openbeta-export.git || exit 1
20+
21+
cd openbeta-export
22+
git config user.name "ob-export-user"
23+
git config user.email "db-export-bot@noreply"
24+
25+
mv ../${ZIP_FILE} .
26+
2027
git add -A
2128
git commit -am "export crag data"
2229
git push origin production

0 commit comments

Comments
 (0)