mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 20:11:49 +00:00
trumped build
This commit is contained in:
1 parent
b978eb1d47
commit
0bacdc5c7a
3 files changed
+46
-1
No files matched your search
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# NB: This file is executed by Netlify to build trumped.com
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
# Add the GIT SHA to the build
|
||||
# This must be done before everything else, or it will get cached with the build.
|
||||
# (This might be making the builds less performant?)
|
||||
# COMMIT_REF is defined by Netlify to be the commit SHA
|
||||
# We want a short 8 character reference.
|
||||
echo "Labelling build with short SHA..."
|
||||
SHORT_SHA=$(echo "${COMMIT_REF}" | cut -c1-8)
|
||||
find . -type f -exec sed -i "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} +
|
||||
# The above command won't work with Mac's version of find/sed. The following is a Mac-friendly version:
|
||||
# find . -type f -exec sed -i '' -e "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} +
|
||||
|
||||
# --ignore-engines: https://stackoverflow.com/a/59615348
|
||||
yarn build-trumped --verbose --ignore-optional --ignore-engines
|
||||
|
||||
mkdir trumped.com
|
||||
mv packages/trumped.com/build/ trumped.com/build/
|
||||
|
||||
echo "Copying redirects configuration to Netlify build dir..."
|
||||
cp _redirects trumped.com/build/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import Howl from 'howler';
|
||||
import React from 'react';
|
||||
import { getRandomInt } from '../../Utils';
|
||||
import { SpeakRequest } from './SpeakRequest';
|
||||
|
||||
const AUDIO_FILES = [
|
||||
'/wav/fakeyou_1.wav',
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
MASTER_BRANCH='master'
|
||||
PRODUCTION_BRANCH='production-trumped'
|
||||
|
||||
git stash
|
||||
git checkout $MASTER_BRANCH
|
||||
git pull
|
||||
|
||||
if git show-ref --verify --quiet "refs/heads/$PRODUCTION_BRANCH"; then
|
||||
echo "Deleting branch ${PRODUCTION_BRANCH}"
|
||||
git branch -D $PRODUCTION_BRANCH
|
||||
fi
|
||||
|
||||
git checkout -b $PRODUCTION_BRANCH
|
||||
git push --set-upstream origin $PRODUCTION_BRANCH
|
||||
|
||||
git checkout $MASTER_BRANCH
|
||||
|
||||
Reference in new issue
Block a user