mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 18:54:52 +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..."
|
echo "building client..."
|
||||||
cd client
|
cd client
|
||||||
yarn --production=false
|
yarn --production=false
|
||||||
|
REACT_APP_COMMIT_SHA=`git rev-parse --short HEAD` \
|
||||||
REACT_APP_API_HOST=$API_HOST \
|
REACT_APP_API_HOST=$API_HOST \
|
||||||
REACT_APP_API_PROTOCOL=$API_PROTOCOL \
|
REACT_APP_API_PROTOCOL=$API_PROTOCOL \
|
||||||
REACT_APP_API_PORT=$API_PORT \
|
REACT_APP_API_PORT=$API_PORT \
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"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",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
|
@ -32,10 +32,8 @@ class About extends Component {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h4>Version</h4>
|
<h4>Version</h4>
|
||||||
<p><strong>Client</strong>
|
<p>
|
||||||
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>
|
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>
|
||||||
<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>
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<h4>Software</h4>
|
<h4>Software</h4>
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
rm -rf build
|
rm -rf build
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
npx babel src -d dist/src --copy-files
|
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
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "VERSION",
|
|
||||||
"sha": "SHA"
|
|
||||||
}
|
|
@ -6,7 +6,6 @@ import Io from 'socket.io';
|
|||||||
import KoaBody from 'koa-body';
|
import KoaBody from 'koa-body';
|
||||||
import cors from 'kcors';
|
import cors from 'kcors';
|
||||||
import Router from 'koa-router';
|
import Router from 'koa-router';
|
||||||
import config from './config';
|
|
||||||
import bluebird from 'bluebird';
|
import bluebird from 'bluebird';
|
||||||
import Redis from 'redis';
|
import Redis from 'redis';
|
||||||
import socketRedis from 'socket.io-redis';
|
import socketRedis from 'socket.io-redis';
|
||||||
@ -51,8 +50,6 @@ router.post('/handshake', koaBody, async (ctx) => {
|
|||||||
ready: true,
|
ready: true,
|
||||||
isLocked: Boolean(roomExists && roomExists.isLocked),
|
isLocked: Boolean(roomExists && roomExists.isLocked),
|
||||||
size: ((roomExists && roomExists.users.length) || 0) + 1,
|
size: ((roomExists && roomExists.users.length) || 0) + 1,
|
||||||
version: config.version,
|
|
||||||
sha: config.sha,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user