Skip to content

Instantly share code, notes, and snippets.

@trotzig
Created August 31, 2018 05:50
Show Gist options
  • Save trotzig/6318efdade8bac20220ef507cde7729d to your computer and use it in GitHub Desktop.
Save trotzig/6318efdade8bac20220ef507cde7729d to your computer and use it in GitHub Desktop.
#!/bin/bash
browser=$1
if [ -z "$browser" ]; then
echo "Usage: ./deploy.sh <browser>"
exit 1
fi
set -euo pipefail
# Copy the right files
cp "Dockerfile-${browser}" Dockerfile
cp "now.json-${browser}" now.json
# Deploy the app
now -e BROWSER_TYPE="${browser}"
# Use the right alias
now alias "happo-${browser}"
ts=$(date +"%Y-%m-%d-%H-%M")
git tag "release-${browser}-${ts}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment