Skip to content

Commit 172f120

Browse files
authored
Update UnityGetProjectVersionV1 shared library dependency (#281)
* Update gitignore to exlude taskkey for testing * Do not build when running test * Update UnityGetProjectVersionV1 shared library dependency * Try using LoadAsync when creating mock task runner
1 parent 72ab795 commit 172f120

File tree

4 files changed

+26
-18
lines changed

4 files changed

+26
-18
lines changed

Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.1]
9+
10+
### Changed
11+
12+
- Updated shared library (https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks-lib) dependency
13+
814
## [1.1.0]
915

1016
### Fixed

Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dinomite-studios/unity-get-project-version-task",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Azure Pipelines task to get the project version of a Unity project.",
55
"main": "unity-get-project-version.js",
66
"scripts": {
@@ -19,7 +19,7 @@
1919
"dependencies": {
2020
"@types/node": "^22.9.1",
2121
"@types/q": "^1.5.8",
22-
"@dinomite-studios/unity-azure-pipelines-tasks-lib": "^1.0.9",
22+
"@dinomite-studios/unity-azure-pipelines-tasks-lib": "^1.0.11",
2323
"azure-pipelines-task-lib": "^4.17.3"
2424
},
2525
"devDependencies": {

Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"version": {
1313
"Major": 1,
1414
"Minor": 1,
15-
"Patch": 0
15+
"Patch": 1
1616
},
1717
"releaseNotes": "[Full Changelog](https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks/blob/master/Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1/CHANGELOG.md)",
1818
"minimumAgentVersion": "2.144.0",

Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1/test/_suite.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@ import assert from 'assert';
22
import * as mocktest from 'azure-pipelines-task-lib/mock-test';
33
import * as path from 'path';
44

5-
describe("Unity Get Project Version", () => {
5+
describe("Unity Get Project Version V1 tests", () => {
66
it("Error determining the project version from file", (done) => {
7-
let testPath = path.join(__dirname, 'errorDeterminingTheProjectVersionFromFile.js');
7+
const testPath = path.join(__dirname, 'errorDeterminingTheProjectVersionFromFile.js');
8+
const runner: mocktest.MockTestRunner = new mocktest.MockTestRunner();
89

9-
let runner: mocktest.MockTestRunner = new mocktest.MockTestRunner(testPath);
10-
11-
runner.runAsync()
10+
runner.LoadAsync(testPath)
1211
.then(() => {
13-
assert.strictEqual(runner.failed, true);
14-
assert.strictEqual(runner.invokedToolCount, 0);
15-
assert(runner.stdOutContained('loc_mock_failGetUnityEditorVersion | Unknown project version format encountered'));
16-
17-
done();
12+
runner.runAsync()
13+
.then(() => {
14+
assert.strictEqual(runner.failed, true);
15+
assert.strictEqual(runner.invokedToolCount, 0);
16+
assert(runner.stdOutContained('loc_mock_failGetUnityEditorVersion | Unknown project version format encountered'));
17+
18+
done();
19+
});
1820
});
19-
})
21+
});
2022

2123
it("Success (alpha) determining the project version from file", (done) => {
2224
let testPath = path.join(__dirname, 'successAlphaDeterminingTheProjectVersionFromFile.js');
@@ -33,7 +35,7 @@ describe("Unity Get Project Version", () => {
3335

3436
done();
3537
});
36-
})
38+
});
3739

3840
it("Success (beta) determining the project version from file", (done) => {
3941
let testPath = path.join(__dirname, 'successBetaDeterminingTheProjectVersionFromFile.js');
@@ -50,7 +52,7 @@ describe("Unity Get Project Version", () => {
5052

5153
done();
5254
});
53-
})
55+
});
5456

5557
it("Success (stable) determining the project version from file", (done) => {
5658
let testPath = path.join(__dirname, 'successStableDeterminingTheProjectVersionFromFile.js');
@@ -67,5 +69,5 @@ describe("Unity Get Project Version", () => {
6769

6870
done();
6971
});
70-
})
71-
})
72+
});
73+
});

0 commit comments

Comments
 (0)