This repository was archived by the owner on Jun 3, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +66
-0
lines changed Expand file tree Collapse file tree 4 files changed +66
-0
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,4 @@ macro_rules! example {
4242
4343example ! ( simple) ;
4444example ! ( bigger) ;
45+ example ! ( heroku_deploy) ;
Original file line number Diff line number Diff line change 1+ All tests passed.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ if [ -z " $1 " ] ; then
4+ echo please, pass in the heroku app as an argument 1>&2
5+ exit 1
6+ fi
7+
8+ if [ -n " $( git status --porcelain) " ] && [ " $2 " != " --force" ] ; then
9+ echo exiting, git repo not clean 1>&2
10+ exit 1
11+ fi
12+
13+ if ! cargo test ; then
14+ echo exiting, tests don\' t pass 1>&2
15+ exit 1
16+ fi
17+
18+ heroku container:push web --app " $1 "
19+ heroku container:release web --app " $1 "
Original file line number Diff line number Diff line change 1+ protocols :
2+ # exits when the git repo is not clean
3+ - env : &env
4+ PATH : /snap/bin:~/.cargo/bin:/usr/local/cargo/bin/:/usr/bin:/bin
5+ arguments : test-heroku-app
6+ protocol :
7+ - command : git status --porcelain
8+ stdout : " M some-changed-file\n "
9+ stderr : " exiting, git repo not clean\n "
10+ exitcode : 1
11+
12+ # exits and prints a usage message when no arguments given
13+ - env : *env
14+ protocol : []
15+ stderr : " please, pass in the heroku app as an argument\n "
16+ exitcode : 1
17+
18+ # exits when the tests don't pass
19+ - env : *env
20+ arguments : test-heroku-app
21+ protocol :
22+ - git status --porcelain
23+ - command : cargo test
24+ exitcode : 1
25+ stderr : " exiting, tests don't pass\n "
26+ exitcode : 1
27+
28+ # builds and deploys to heroku
29+ - env : *env
30+ arguments : test-heroku-app
31+ protocol :
32+ - git status --porcelain
33+ - cargo test
34+ - heroku container:push web --app test-heroku-app
35+ - heroku container:release web --app test-heroku-app
36+
37+ # allows to force deploying of dirty git repo
38+ - env : *env
39+ arguments : test-heroku-app --force
40+ protocol :
41+ - command : git status --porcelain
42+ stdout : " M some-changed-file\n "
43+ - cargo test
44+ - heroku container:push web --app test-heroku-app
45+ - heroku container:release web --app test-heroku-app
You can’t perform that action at this time.
0 commit comments