Skip to content

Commit 20224ab

Browse files
committed
deploy to GCloud, bump Ruby version
1 parent 96a99b1 commit 20224ab

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source "https://rubygems.org"
2-
ruby '2.5.3'
2+
ruby '2.5.7'
33
gem 'sinatra'
44
gem 'sinatra-contrib'
55
gem 'sinatra-jsonp'

deploy.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#!/bin/bash
22
#
3-
# deploy the ruby backend to zeit
3+
# deploy to gcloud
44
#
55

6-
set -o errexit
7-
set -o pipefail
8-
set -o nounset
6+
cat app.yaml \
7+
| jq --sort-keys ".env_variables.LASTMOD|=\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"|.env_variables.COMMIT|=\"$(git rev-parse --short HEAD)\"" \
8+
| ex -sc 'wq!app.yaml' /dev/stdin
99

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
10+
gcloud app deploy \
11+
--project regexplanet-ruby
12+
13+
cat app.yaml \
14+
| jq 'del(.env_variables.LASTMOD)|del(.env_variables.COMMIT)' \
15+
| ex -sc 'wq!app.yaml' /dev/stdin

0 commit comments

Comments
 (0)