Skip to content
Permalink
cfb897a1c0
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 18 lines (15 sloc) 376 Bytes
#!/bin/bash
BRANCH=${BRANCH:-$(git branch --show-current)}
TARGET_DOMAIN="$BRANCH--surmblog.netlify.app"
if [ "$BRANCH" = "master" ]; then
TARGET_DOMAIN="surma.dev"
fi
export TARGET_DOMAIN
export BRANCH
PUBLIC_URL=${PUBLIC_URL:-"https://${TARGET_DOMAIN}"}
npx eleventy
(
cd .tmp
npm i
npx parcel build --dist-dir ../_site index.html --public-url "${PUBLIC_URL}"
)