mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 10:49:02 +00:00
Fix for displaying current commit SHA
This commit is contained in:
parent
438f465c6a
commit
612eb522b7
1
build.sh
1
build.sh
@ -1,6 +1,7 @@
|
||||
echo "building client..."
|
||||
cd client
|
||||
yarn --production=false
|
||||
REACT_APP_COMMIT_SHA=`git rev-parse --short HEAD` \
|
||||
REACT_APP_API_HOST=$API_HOST \
|
||||
REACT_APP_API_PROTOCOL=$API_PROTOCOL \
|
||||
REACT_APP_API_PORT=$API_PORT \
|
||||
|
@ -42,7 +42,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "REACT_APP_COMMIT_SHA=`git rev-parse --short HEAD` react-scripts build",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
|
@ -32,10 +32,8 @@ class About extends Component {
|
||||
return (
|
||||
<div>
|
||||
<h4>Version</h4>
|
||||
<p><strong>Client</strong>
|
||||
Commit SHA: <a target="_blank" href={`https://github.com/darkwire/darkwire-client/commit/${process.env.REACT_APP_COMMIT_SHA}`}>{process.env.REACT_APP_COMMIT_SHA}</a></p>
|
||||
<p><strong>Server</strong>
|
||||
Commit SHA: <a target="_blank" href={`https://github.com/darkwire/darkwire-server/commit/${this.props.serverSHA}`}>{this.props.serverSHA}</a></p>
|
||||
<p>
|
||||
Commit SHA: <a target="_blank" href={`https://github.com/darkwire/darkwire.io/commit/${process.env.REACT_APP_COMMIT_SHA}`}>{process.env.REACT_APP_COMMIT_SHA}</a></p>
|
||||
<br />
|
||||
|
||||
<h4>Software</h4>
|
||||
|
@ -1,9 +1,3 @@
|
||||
rm -rf build
|
||||
rm -rf dist
|
||||
npx babel src -d dist/src --copy-files
|
||||
|
||||
sha=`git rev-parse HEAD`
|
||||
|
||||
echo $sha
|
||||
|
||||
perl -pi -e "s/SHA/$sha/g" dist/src/config.json
|
||||
npx babel src -d dist/src --copy-files
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"version": "VERSION",
|
||||
"sha": "SHA"
|
||||
}
|
@ -6,7 +6,6 @@ import Io from 'socket.io';
|
||||
import KoaBody from 'koa-body';
|
||||
import cors from 'kcors';
|
||||
import Router from 'koa-router';
|
||||
import config from './config';
|
||||
import bluebird from 'bluebird';
|
||||
import Redis from 'redis';
|
||||
import socketRedis from 'socket.io-redis';
|
||||
@ -51,8 +50,6 @@ router.post('/handshake', koaBody, async (ctx) => {
|
||||
ready: true,
|
||||
isLocked: Boolean(roomExists && roomExists.isLocked),
|
||||
size: ((roomExists && roomExists.users.length) || 0) + 1,
|
||||
version: config.version,
|
||||
sha: config.sha,
|
||||
};
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user