Skip to content

Commit

Permalink
fix: use correct version tags for samples
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Nov 8, 2021
1 parent 6e126c2 commit 806ffd9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/writeVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const gitTag = execSync('git tag -l --points-at HEAD').toString().trim();

let version = gitTag || require(packageJson).version;
if (!version || version === '0.0.0-semantically-release') {
version = 'nightly (master)';
version = 'master';
}

fs.writeFileSync(versionFile, `window.GLANCE_VERSION = "${version}";\n`);
11 changes: 10 additions & 1 deletion src/components/core/AboutBox/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ export default {
},
data() {
return {
version: window.GLANCE_VERSION || 'not available',
version: 'not available',
};
},
created() {
if (window.GLANCE_VERSION) {
if (window.GLANCE_VERSION === 'master') {
this.version = 'nightly (master)';
} else {
this.version = window.GLANCE_VERSION;
}
}
},
};

0 comments on commit 806ffd9

Please sign in to comment.