Browse Source

Uses environment variable to set JitsiMeetJS.version.

dev1
damencho 8 years ago
parent
commit
6b12dcfd09
2 changed files with 1 additions and 23 deletions
  1. 0
    12
      get-version.sh
  2. 1
    11
      webpack.config.js

+ 0
- 12
get-version.sh View File

1
-#!/usr/bin/env bash
2
-
3
-if [[ -z "$LIB_JITSI_MEET_REPO" ]];
4
-then
5
-    echo "development";
6
-    exit 0;
7
-fi
8
-
9
-COMMIT_HASH=$(cd $LIB_JITSI_MEET_REPO && git rev-parse --short HEAD)
10
-COMMIT_TAG=$(cd $LIB_JITSI_MEET_REPO && git describe --abbrev=0 --tags)
11
-
12
-echo "${COMMIT_TAG}#${COMMIT_HASH}";

+ 1
- 11
webpack.config.js View File

1
 /* global __dirname */
1
 /* global __dirname */
2
 
2
 
3
-const child_process = require('child_process'); // eslint-disable-line camelcase
4
 const process = require('process');
3
 const process = require('process');
5
 const webpack = require('webpack');
4
 const webpack = require('webpack');
6
 
5
 
38
             options: {
37
             options: {
39
                 flags: 'g',
38
                 flags: 'g',
40
                 replace:
39
                 replace:
41
-                    child_process.execSync( // eslint-disable-line camelcase
42
-                        `${__dirname}/get-version.sh`)
43
-
44
-                        // The type of the return value of
45
-                        // child_process.execSync is either Buffer or String.
46
-                        .toString()
47
-
48
-                        // Shells may automatically append CR and/or LF
49
-                        // characters to the output.
50
-                        .trim(),
40
+                    process.env.LIB_JITSI_MEET_COMMIT_HASH || 'development',
51
                 search: '{#COMMIT_HASH#}'
41
                 search: '{#COMMIT_HASH#}'
52
             },
42
             },
53
             test: `${__dirname}/JitsiMeetJS.js`
43
             test: `${__dirname}/JitsiMeetJS.js`

Loading…
Cancel
Save