Merge pull request #14 from storytold/echelon-add-sha-to-most-sites

Add SHA to most of the websites (except OBS)
This commit is contained in:
Brandon Thomas authored and GitHub committed 2022-06-19 03:47:29 -04:00
commit 2ddedb73be
8 files changed
+58 -3

No files matched your search

+3 -1
View File
@@ -12,9 +12,11 @@ mv packages/fakeyou/build/ fakeyou/build/
# Add the GIT SHA to the build
# 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 '' -e "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} + # Mac-friendly version
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" {} +
echo "Copying redirects configuration to Netlify build dir..."
cp _redirects fakeyou/build/
+9
View File
@@ -9,6 +9,15 @@ yarn build-storyteller-home --verbose --ignore-optional --ignore-engines
mkdir storyteller-home
mv packages/storyteller-home/build/ storyteller-home/build/
# Add the GIT SHA to the build
# 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" {} +
echo "Copying redirects configuration to Netlify build dir..."
cp _redirects storyteller-home/build/
+9
View File
@@ -9,6 +9,15 @@ yarn build-storyteller-obs --verbose --ignore-optional --ignore-engines
mkdir storyteller-obs
mv packages/storyteller-obs/build/ storyteller-obs/build/
# Add the GIT SHA to the build
# 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" {} +
echo "Copying redirects configuration to Netlify build dir..."
cp _redirects storyteller-obs/build/
+9
View File
@@ -9,6 +9,15 @@ yarn build-storyteller-stream --verbose --ignore-optional --ignore-engines
mkdir storyteller-stream
mv packages/storyteller-stream/build/ storyteller-stream/build/
# Add the GIT SHA to the build
# 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" {} +
echo "Copying redirects configuration to Netlify build dir..."
cp _redirects storyteller-stream/build/
+6 -1
View File
@@ -19,4 +19,9 @@ body {
.mainwrap {
max-width: 1000px;
margin: auto;
}
}
.git-sha {
color: #999;
font-size: 0.8rem;
}
@@ -1,4 +1,5 @@
import React from 'react';
import { GitSha } from '@storyteller/components/src/elements/GitSha';
interface Props {
}
@@ -11,6 +12,9 @@ function Footer(props: Props) {
<p>
Copyright &copy; 2020 &mdash; 2022 Learning Machines, Inc. (makers of FakeYou and Storyteller)
</p>
<p>
<GitSha />
</p>
</div>
</footer>
</>
+6 -1
View File
@@ -19,4 +19,9 @@ body {
.mainwrap {
max-width: 1000px;
margin: auto;
}
}
.git-sha {
color: #999;
font-size: 0.8rem;
}
+12
View File
@@ -3,6 +3,7 @@ import './App.scss';
import React from 'react';
import { BrowserRouter, Route, Switch } from "react-router-dom";
import { GitSha } from '@storyteller/components/src/elements/GitSha';
import { ListTtsModels, TtsModelListItem } from '@storyteller/components/src/api/tts/ListTtsModels';
import StreamPage from './pages/stream/StreamPage';
import i18n from 'i18next';
@@ -185,6 +186,17 @@ class App extends React.Component<Props, State> {
</Route>
</Switch>
<footer className="footer">
<div className="content has-text-centered">
<p>
Copyright &copy; 2022 Storyteller
</p>
<p>
<GitSha />
</p>
</div>
</footer>
</div>
</div>
</BrowserRouter>