Skip to content

Commit 986cd39

Browse files
committed
updated deploy script
1 parent 826b2ff commit 986cd39

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

deploy.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
#!/bin/bash
22
#
3-
# deploy the xregexp backend to zeit
3+
# deploy the js backend to Zeit
44
#
55

6+
set -o errexit
7+
set -o pipefail
8+
set -o nounset
69

7-
echo "INFO: listing existing versions"
8-
now ls regexplanet-xregexp
9-
10-
echo "INFO: deploying"
11-
now && now alias
12-
13-
#
14-
# need to kill the old version!
15-
#
16-
echo "INFO: removing the old version "
17-
echo "WARNING: must be done manually with 'now rm'"
10+
now \
11+
--env COMMIT=$(git rev-parse --short HEAD) \
12+
--env LASTMOD=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
13+
&& now alias \
14+
&& now rm $(cat ./now.json | jq '.name' --raw-output) --safe --yes

0 commit comments

Comments
 (0)