-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update readme, finish first pass at script
- Loading branch information
Showing
4 changed files
with
65 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
venv/ | ||
.DS_Store | ||
fontc/ | ||
GITHUB_TOKEN | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,15 +21,32 @@ FONTC_DIR=./fontc | |
FONTC_REQUIREMENTS="$FONTC_DIR/resources/scripts/requirements.txt" | ||
# relative to FONTC_DIR | ||
SCRIPT_PATH=fontc_crater/resources/ci.sh | ||
GITHUB_TOKEN=$(<"GITHUB_TOKEN") | ||
|
||
# make sure that the upstream repo is configured to authenticate with our token: | ||
git remote set-url origin "https://$GITHUB_TOKEN:[email protected]/googlefonts/fontc_crater.git" | ||
|
||
if [ ! -d venv ]; then | ||
echo "setting up venv" | ||
python -m venv venv | ||
if [ $? -ne 0 ]; then | ||
if [ $? -ne 0 ]; then | ||
echo "failed to set upstream" | ||
exit 1 | ||
fi | ||
|
||
# first make sure this repo is up to date, in case some config changes were pushed | ||
git pull | ||
if [ $? -ne 0 ]; then | ||
echo "git pull failed, exiting" | ||
exit 1 | ||
fi | ||
|
||
if [ -d venv ]; then | ||
rm -rf venv | ||
fi | ||
|
||
echo "setting up venv" | ||
python -m venv venv | ||
if [ $? -ne 0 ]; then | ||
echo could not setup venv, exiting | ||
exit 1 | ||
fi | ||
fi | ||
|
||
source venv/bin/activate | ||
|
@@ -54,3 +71,8 @@ deactivate | |
mv $GENERATED_HTML index.html | ||
|
||
# todo: commit and push repo | ||
git add . | ||
git commit -m 'Automated commit' | ||
if [ $? -eq 0 ]; then | ||
git push | ||
fi |