Skip to content

Commit

Permalink
fix: fixes incorrect reporting of version numbers during test run
Browse files Browse the repository at this point in the history
  • Loading branch information
George Cook committed Sep 23, 2019
1 parent ff2a592 commit e820831
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#### 3.2.2 (2019-09-23)

#### 3.2.1 (2019-09-23)

##### Chores
Expand Down
10 changes: 9 additions & 1 deletion gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,15 @@ export function updateVersion(cb) {
cb();
}

exports.build = series(clean, createDirectories, compile, squash, copyToSamples, copyToTests);
function insertVersionNumber(cb) {
const filePath = path.join(buildDir, 'Rooibos.brs');
let text = fs.readFileSync(filePath, 'utf8');
text = text.replace('#ROOIBOS_VERSION#', pkg.version);
fs.writeFileSync(filePath, text, 'utf8');
cb();
}

exports.build = series(clean, createDirectories, compile, insertVersionNumber, squash, copyToSamples, copyToTests);
exports.runFrameworkTests = series(exports.build, prepareFrameworkTests, zipFrameworkTests, deployFrameworkTests)
exports.prePublishFrameworkTests = series(exports.build, prepareFrameworkTests)
exports.prePublishFrameworkCodeCoverage = series(exports.build, prepareCodeCoverageTests)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rooibos",
"version": "3.2.1",
"version": "3.2.2",
"description": "simple, flexible, fun brihhtscript test framework for roku scenegraph apps",
"main": "index.js",
"directories": {
Expand Down
4 changes: 2 additions & 2 deletions src/Rooibos.bs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function Init(preTestSetup = invalid, testUtilsDecoratorMethodName = invalid, te

args.testScene = scene
args.global = m.global
rooibosVersion = "3.1.1"
rooibosVersion = "#ROOIBOS_VERSION#"
requiredRooibosPreprocessorVersion = "1.0.0"

if not RBS_CMN.isFunction(RBSFM_getPreprocessorVersion)
Expand All @@ -72,7 +72,7 @@ function Init(preTestSetup = invalid, testUtilsDecoratorMethodName = invalid, te
? "######################################################"
? ""
? "# rooibos framework version: " ; rooibosVersion
? "# tests parsed with rooibosC version: " ; rooibosVersion
? "# tests parsed with rooibosC version: " ; RBSFM_getPreprocessorVersion()
? "######################################################"
? ""

Expand Down

0 comments on commit e820831

Please sign in to comment.