Skip to content

Commit c39bd6d

Browse files
committed
Publish version of the app.
1 parent b2881ef commit c39bd6d

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

docker-source.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set -e
2+
3+
apt-get update -q -q
4+
apt-get install --yes --force-yes git
5+
6+
cd /source
7+
echo "module.exports = '$(git describe --always --dirty=+)';" > /source/server/imports/gitversion.js

server/imports/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gitversion.js

server/version.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* eslint-disable global-require */
2+
/* globals __meteor_runtime_config__ */
3+
4+
try {
5+
// We try to import the file. It should be generated during the build process,
6+
// exporting the version of the app (like git commit hash).
7+
// If it is an empty string, set it to null.
8+
__meteor_runtime_config__.VERSION = require('./imports/gitversion.js') || null;
9+
}
10+
catch (error) {
11+
// We are ignoring the error.
12+
__meteor_runtime_config__.VERSION = null;
13+
}

0 commit comments

Comments
 (0)