-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@kylewm mind trying this out when you get a chance? not urgent.
- Loading branch information
Showing
2 changed files
with
39 additions
and
9 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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
# | ||
# Checks pre-deploy safeguards - tests, app keys, package versions - then deploys. | ||
# | ||
# Expects that your local bridgy, granary, and oauth-dropins repos are all in | ||
# the same directory, and that you have the App Engine SDK installed. | ||
# | ||
# TODO: check that granary, oauth-dropins, and webutil are up to date. | ||
|
||
set -e | ||
src=`dirname $0`/../.. | ||
|
||
# run unit tests | ||
cd $src/oauth-dropins && source local/bin/activate | ||
python -m unittest discover | ||
|
||
cd $src/granary && source local/bin/activate | ||
python -m unittest discover | ||
|
||
cd $src/bridgy && source local/bin/activate | ||
python -m unittest discover | ||
|
||
# check silo app keys (aka client ids) | ||
md5sum -c keys.md5 | ||
|
||
# check package versions | ||
missing=`pip freeze -q -r requirements.freeze.txt | join --nocheck-order -v 2 - requirements.freeze.txt` | ||
if [[ "$missing" != "" ]]; then | ||
echo 'ERROR: Package version mismatch! Expected:' | ||
echo $missing | ||
exit 1 | ||
fi | ||
|
||
echo 'Package versions OK.' | ||
|
||
# push commits and deploy! | ||
git push | ||
appcfg.py update . |
793899d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh this looks great, will test soon!
793899d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question about the package version check. The order of the two file inputs to join seem wrong (at least from what I run) -- comparing my working environment where blinker is a new package to the frozen file...
793899d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh, that's odd. i definitely get the opposite behavior. ie i want to find anything in the frozen file (the second arg) that isn't in the first, hence
-v 2
.i wonder what we're missing.