-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #340 from SynBioDex/frontend-build-fix
Frontend build fix
- Loading branch information
Showing
8 changed files
with
58 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const { writeFileSync } = require('fs'); | ||
const { promisify } = require('util'); | ||
const child = require('child_process'); | ||
const exec = promisify(child.exec); | ||
|
||
async function createVersionsFile(filename) { | ||
const revision = process.argv[2] | ||
?? (await exec('git rev-parse --short HEAD')).stdout.toString().trim(); | ||
const branch = process.argv[3] | ||
?? (await exec('git rev-parse --abbrev-ref HEAD')).stdout.toString().trim(); | ||
let version = process.env.npm_package_version | ||
?? (await exec('git tag --points-at HEAD')).stdout.toString().trim(); | ||
|
||
if (version == '') { | ||
version = 'Latest'; | ||
} | ||
|
||
console.log(`revision: '${revision}', branch: '${branch}', version: '${version}'`); | ||
|
||
const content = ` | ||
// this file is automatically generated by git.version.js script | ||
exports.versions = { | ||
revision: '${revision}', | ||
branch: '${branch}', | ||
version: '${version}' | ||
};`; | ||
|
||
writeFileSync(filename, content, { encoding: 'utf8' }); | ||
} | ||
|
||
createVersionsFile('src/environments/versions.js'); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const environment = { | ||
production: true, | ||
backendURL: '/api', | ||
backendURL: "/api", | ||
baseURI: "https://sbolcanvas.org" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const environment = { | ||
production: false, | ||
backendURL: "https://sbolcanvas-api.victoriouswater-326a4bf8.westcentralus.azurecontainerapps.io/api", | ||
baseURI: "https://sbolcanvas.org" | ||
}; |