Skip to content

Commit

Permalink
Update updater, and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
glasnt committed Mar 14, 2021
1 parent e063329 commit 2fe5376
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
14 changes: 10 additions & 4 deletions demo/README.md
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]
```
32 changes: 24 additions & 8 deletions demo/update.sh
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

0 comments on commit 2fe5376

Please sign in to comment.