-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
34 additions
and
12 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,10 +1,16 @@ | ||
# Update demo | ||
|
||
This is a live script that will probably only work if you have the following things installed: | ||
This is a live script that will probably only work if you are glasnt and have the following things installed: | ||
|
||
* Python 3.7+ | ||
* ih (latest) | ||
* node && puppeteer | ||
* git-version-bump and git-release | ||
* a local dev environment with ih and a virtualenv in `venv` | ||
* node && [`puppeteer`](https://github.com/puppeteer/puppeteer) | ||
* git-version-bump and git-release, and creds for such | ||
|
||
See `update.sh` for update process. | ||
|
||
Usage: | ||
|
||
``` | ||
./demo/update.sh [p|mi|ma] | ||
``` |
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,39 +1,55 @@ | ||
#!/bin/bash | ||
|
||
update=${1:-p} | ||
# WARNING ERRORONOUS | ||
# WARNING ERRORONOUS AND CONTAINS SIDEEFFECTS | ||
|
||
if [[ $(git diff --stat) != '' ]]; then | ||
echo "dirty git. will not continue" | ||
exit 0 | ||
fi | ||
|
||
branch=$(git branch | grep '*' | cut -d' ' -f2) | ||
|
||
if [[ "$branch" != 'latest' ]]; then | ||
echo "not on latest branch. will not continue" | ||
exit 0 | ||
fi | ||
|
||
echo "We will be releasing a $update update ($(git vb $update -d))" | ||
|
||
read -r -p "Are you sure? [y/N] " response | ||
if [[ "$response" =~ ^(yes|y)$ ]] | ||
then | ||
|
||
echo "processing" | ||
sleep 1 | ||
|
||
echo "Update CLI usage" | ||
|
||
source venv/bin/activate | ||
pip install -e . | ||
ih --version | ||
|
||
python demo/update_readme.py | ||
|
||
git add . && git commit -m "update cli usage" | ||
git add README.md && git commit -m "update cli usage" | ||
|
||
echo "bump" | ||
git version-bump $update | ||
|
||
echo "use new version" | ||
source venv/bin/activate | ||
pip install -e . | ||
ih --version | ||
|
||
# Hard-copy from README.md example | ||
ih -p alpaca -r -c 4 demo/demo_image.png -f demo/ | ||
|
||
deactivate | ||
|
||
echo "Update demo render" | ||
node demo/update_render.js | ||
|
||
git add . && git commit -m "update demo render" | ||
git add demo/demo_render.png && git commit -m "update demo render" | ||
|
||
git release | ||
else | ||
echo "Not continuing" | ||
|
||
echo "user bailed. will not continue" | ||
fi |