-
Notifications
You must be signed in to change notification settings - Fork 1
/
run
executable file
·62 lines (48 loc) · 1.16 KB
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#! /usr/bin/env bash
set -euo pipefail
export NATS_URL=nats://localhost:4222
export TOKEN_ENDPOINT=https://playtix.okta.com/oauth2/default/v1/token
export USERINFO_ENDPOINT=https://playtix.okta.com/oauth2/default/v1/userinfo
export AUTHORIZE_ENDPOINT=https://playtix.okta.com/oauth2/default/v1/authorize
export AUTHN_ENDPOINT=https://playtix.okta.com/api/v1/authn
export SESSIONS_ENDPOINT=https://playtix.okta.com/api/v1/sessions
declare -a tags=(
$(git rev-parse --verify HEAD --short)
$(node -p -e "require('./package.json').version")
)
declare name=$(node -p -e "require('./package.json').name")
function start() {
docker-compose up
}
function stop() {
docker-compose stop
}
function docker-build() {
docker build . -t jwalab/$name
}
function docker-tag() {
for tag in ${tags[@]}
do
docker tag jwalab/$name jwalab/$name:$tag
done
}
function docker-push() {
docker push jwalab/$name
for tag in ${tags[@]}
do
docker push jwalab/$name:$tag
done
}
function start-node() {
node dist/index.js
}
function dev() {
npm run dev
}
function build() {
npm run build
}
function test() {
npm run test
}
"$@"