Purge
This commit is contained in:
1 parent
36472ef5f6
commit
9c1a2b987b
83 files changed
-5115
No files matched your search
@@ -1,18 +0,0 @@
|
||||
const path = require('path');
|
||||
const ProgramBuilder = require('brighterscript').ProgramBuilder;
|
||||
const DiagnosticSeverity = require('brighterscript').DiagnosticSeverity;
|
||||
|
||||
let programBuilder = new ProgramBuilder();
|
||||
programBuilder.run({
|
||||
project: path.join(__dirname, '../', 'bsconfig.json')
|
||||
}).then(() => {
|
||||
//fail if there are diagnostics
|
||||
if (programBuilder.program.getDiagnostics().filter((x) => x.severity === DiagnosticSeverity.Error).length > 0) {
|
||||
throw new Error('Encountered error diagnostics');
|
||||
} else {
|
||||
console.log('\nBuild is finished');
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log('error', e.message);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,21 +0,0 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const semverParse = require('semver/functions/parse')
|
||||
|
||||
const packageJsonContent = fs.readFileSync("./package.json", {encoding:'utf8', flag:'r'})
|
||||
const packageJson = JSON.parse(packageJsonContent)
|
||||
|
||||
const version = packageJson.version
|
||||
const parsedVersion = semverParse(version)
|
||||
|
||||
let appManifestContent = fs.readFileSync("./src/manifest", {encoding:'utf8', flag:'r'})
|
||||
|
||||
const majorPattern = /major_version=(\d+)/
|
||||
const minorPattern = /minor_version=(\d+)/
|
||||
const buildPattern = /build_version=(\d+)/
|
||||
|
||||
appManifestContent = appManifestContent.replace(majorPattern, `major_version=${parsedVersion.major}`)
|
||||
appManifestContent = appManifestContent.replace(minorPattern, `minor_version=${parsedVersion.minor}`)
|
||||
appManifestContent = appManifestContent.replace(buildPattern, `build_version=${String(parsedVersion.patch).padStart(5, '0')}`)
|
||||
|
||||
fs.writeFileSync("./src/manifest", appManifestContent)
|
||||
Reference in new issue
Block a user