From 93f0fbacdf38854964031487f580e6ebfaea8bf5 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:48:09 +0000 Subject: [PATCH 01/11] Update src/index.js --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index 349346bf9..6b1bb39a3 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,5 @@ /* global AFRAME, THREE, XMLHttpRequest */ +console.log(`3DStreet version: ${VERSION}`); var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); require('./components/anisotropy'); From 6c23b2d8daed4dcf0fe51d6bec6ba0568ce8f2fb Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:48:23 +0000 Subject: [PATCH 02/11] Update webpack.config.js --- webpack.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index f3016985c..c711acd7c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,5 @@ const path = require('path'); +const webpack = require('webpack'); const TerserPlugin = require('terser-webpack-plugin'); module.exports = { @@ -15,5 +16,10 @@ module.exports = { }, optimization: { minimizer: [new TerserPlugin({ extractComments: false })], - } + }, + plugins: [ + new webpack.DefinePlugin({ + VERSION: JSON.stringify(process.env.npm_package_version) + }) + ] }; From e62727a7052dad914294d8e022c2faf31044c0ee Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:54:02 +0000 Subject: [PATCH 03/11] Update src/index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 6b1bb39a3..53f40222d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ /* global AFRAME, THREE, XMLHttpRequest */ -console.log(`3DStreet version: ${VERSION}`); +console.log(`3DStreet Version: ${VERSION}`); var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); require('./components/anisotropy'); From 6f7975d783125c374e675404bc2c5354c0a2b3a0 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:54:26 +0000 Subject: [PATCH 04/11] Update webpack.config.js --- webpack.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index c711acd7c..7ff7fe1b8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,6 +20,12 @@ module.exports = { plugins: [ new webpack.DefinePlugin({ VERSION: JSON.stringify(process.env.npm_package_version) + }), + new webpack.DefinePlugin({ + COMMIT_DATE: JSON.stringify(require('child_process').execSync('git log -1 --format=%cd').toString().trim()) + }), + new webpack.DefinePlugin({ + COMMIT_HASH: JSON.stringify(require('child_process').execSync('git rev-parse --short HEAD').toString().trim()) }) ] }; From 33c04a7ac2d7c735d6dc9862780ed4a9c5ea4f0a Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:58:05 +0000 Subject: [PATCH 05/11] Update src/index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 53f40222d..9dc5ffa04 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ /* global AFRAME, THREE, XMLHttpRequest */ -console.log(`3DStreet Version: ${VERSION}`); +console.log(`3DStreet Version: ${VERSION}, Commit Date: ${COMMIT_DATE}, Commit Hash: ${COMMIT_HASH}`); var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); require('./components/anisotropy'); From b42632c82f436acd663f05910ea6e4d1da66acc5 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:03:23 +0000 Subject: [PATCH 06/11] Update src/index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 9dc5ffa04..33d7258b8 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ /* global AFRAME, THREE, XMLHttpRequest */ -console.log(`3DStreet Version: ${VERSION}, Commit Date: ${COMMIT_DATE}, Commit Hash: ${COMMIT_HASH}`); +console.log(`3DStreet Version: ${VERSION} (Date: ${new Date(COMMIT_DATE).toISOString().split('T')[0]}, Commit Hash: #${COMMIT_HASH})`); var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); require('./components/anisotropy'); From 34424e0191d497b9a08050b2ea74d49a6d500b22 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 01:10:35 +0000 Subject: [PATCH 07/11] Update src/index.js --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index 33d7258b8..466f2d5d5 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,5 @@ /* global AFRAME, THREE, XMLHttpRequest */ +if (typeof VERSION === 'undefined') { var VERSION = 'local'; } console.log(`3DStreet Version: ${VERSION} (Date: ${new Date(COMMIT_DATE).toISOString().split('T')[0]}, Commit Hash: #${COMMIT_HASH})`); var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); From c640d292adb8e0393b2c12c48c04caedbda5d8fa Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 20:51:13 +0000 Subject: [PATCH 08/11] Update src/index.js --- src/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 466f2d5d5..9457f69c3 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,8 @@ /* global AFRAME, THREE, XMLHttpRequest */ if (typeof VERSION === 'undefined') { var VERSION = 'local'; } -console.log(`3DStreet Version: ${VERSION} (Date: ${new Date(COMMIT_DATE).toISOString().split('T')[0]}, Commit Hash: #${COMMIT_HASH})`); +if (VERSION !== 'local') { + console.log(`3DStreet Version: ${VERSION} (Date: ${new Date(COMMIT_DATE).toISOString().split('T')[0]}, Commit Hash: #${COMMIT_HASH})`); +} var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); require('./components/anisotropy'); @@ -467,4 +469,4 @@ AFRAME.registerComponent('wheel', { this.wheel_B_R.rotateY(rateOfRotation); } } -}); +}); \ No newline at end of file From 4e8ef098ee672b21f4ab0b5251f99aa2f7bb9937 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 20:52:44 +0000 Subject: [PATCH 09/11] Update src/index.js --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index 9457f69c3..5cdb48d88 100644 --- a/src/index.js +++ b/src/index.js @@ -2,6 +2,8 @@ if (typeof VERSION === 'undefined') { var VERSION = 'local'; } if (VERSION !== 'local') { console.log(`3DStreet Version: ${VERSION} (Date: ${new Date(COMMIT_DATE).toISOString().split('T')[0]}, Commit Hash: #${COMMIT_HASH})`); +} else { + console.log('Running in local development environment'); } var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); From 8ac658e1d8c1fb512a0dcb376a7db6c3ed8cd63c Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Tue, 8 Aug 2023 14:24:26 -0700 Subject: [PATCH 10/11] simplify logic to display version --- src/index.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/index.js b/src/index.js index 5cdb48d88..34d03779a 100644 --- a/src/index.js +++ b/src/index.js @@ -1,10 +1,5 @@ /* global AFRAME, THREE, XMLHttpRequest */ -if (typeof VERSION === 'undefined') { var VERSION = 'local'; } -if (VERSION !== 'local') { - console.log(`3DStreet Version: ${VERSION} (Date: ${new Date(COMMIT_DATE).toISOString().split('T')[0]}, Commit Hash: #${COMMIT_HASH})`); -} else { - console.log('Running in local development environment'); -} +if (typeof VERSION !== 'undefined') { console.log(`3DStreet Version: ${VERSION} (Date: ${new Date(COMMIT_DATE).toISOString().split('T')[0]}, Commit Hash: #${COMMIT_HASH})`); } var streetmixParsers = require('./aframe-streetmix-parsers'); var streetmixUtils = require('./tested/streetmix-utils'); require('./components/anisotropy'); @@ -471,4 +466,4 @@ AFRAME.registerComponent('wheel', { this.wheel_B_R.rotateY(rateOfRotation); } } -}); \ No newline at end of file +}); From 0eebcb5191391e8bc08b5568e136ccf07d00e63b Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Tue, 8 Aug 2023 14:24:38 -0700 Subject: [PATCH 11/11] minor lint fix --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 7ff7fe1b8..0aa5653d3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,7 +15,7 @@ module.exports = { ] }, optimization: { - minimizer: [new TerserPlugin({ extractComments: false })], + minimizer: [new TerserPlugin({ extractComments: false })] }, plugins: [ new webpack.DefinePlugin({