Skip to content

Commit 896307e

Browse files
committed
Define inputs
1 parent 2406153 commit 896307e

File tree

5 files changed

+359
-175
lines changed

5 files changed

+359
-175
lines changed

Tasks/UnityBuild/UnityBuildV3/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
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+
## [3.4.0]
9+
10+
### Added
11+
12+
- Project versioning configuration to modify a project's bundle version and/or build code and commit the change to the repository as well as create a tag
13+
814
## [3.3.0]
915

1016
### Added
@@ -112,4 +118,4 @@ Maintenance release
112118
### Removed
113119

114120
- Removed build output path output variable. The build output path can now be set by the user as part of the build task configuration, hence output variable is not needed anymore
115-
- Removed build log output variable. Whether to create a build log or not and where can be specified as part of the additional arguments setting
121+
- Removed build log output variable. Whether to create a build log or not and where can be specified as part of the additional arguments setting

Tasks/UnityBuild/UnityBuildV3/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dinomite-studios/unity-build-task",
3-
"version": "3.3.0",
3+
"version": "3.4.0",
44
"description": "An Azure Pipelines task to build Unity projects.",
55
"main": "unity-build.js",
66
"scripts": {

Tasks/UnityBuild/UnityBuildV3/task.json

Lines changed: 113 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
"helpMarkDown": "Use this task to build your Unity project and generate the target platform's output files. [More Information](https://unitydevops.com/docs/unity-build-task)",
77
"category": "Azure Pipelines",
88
"preview": false,
9-
"visibility": [
10-
"Build"
11-
],
9+
"visibility": ["Build"],
1210
"author": "Dinomite",
1311
"version": {
1412
"Major": 3,
15-
"Minor": 3,
13+
"Minor": 4,
1614
"Patch": 0
1715
},
1816
"releaseNotes": "[Full Changelog](https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks/blob/master/Tasks/UnityBuild/UnityBuildV3/CHANGELOG.md)",
@@ -24,6 +22,11 @@
2422
"displayName": "General",
2523
"isExpanded": true
2624
},
25+
{
26+
"name": "versioning",
27+
"displayName": "Versioning",
28+
"isExpanded": true
29+
},
2730
{
2831
"name": "build",
2932
"displayName": "Build",
@@ -91,6 +94,109 @@
9194
"required": false,
9295
"helpMarkDown": "(Optional) Enter the path to the Unity project within the repository. If no value is entered, the root of the repository will be used."
9396
},
97+
{
98+
"name": "projectVersioningBundleVersionMode",
99+
"type": "pickList",
100+
"label": "Bundle versioning mode",
101+
"defaultValue": "none",
102+
"helpMarkDown": "Define if and how to modify the project's bundle version.",
103+
"groupName": "versioning",
104+
"options": {
105+
"none": "None",
106+
"increment": "Increment bundle version",
107+
"set": "Set bundle version"
108+
}
109+
},
110+
{
111+
"name": "projectVersioningBundleVersionMajor",
112+
"type": "string",
113+
"label": "Major (Increment by / Set to)",
114+
"groupName": "versioning",
115+
"helpMarkDown": "Either the new value for the bundle major version or the increment for the major version to apply.",
116+
"visibleRule": "projectVersioningBundleVersionMode = increment || projectVersioningBundleVersionMode = set"
117+
},
118+
{
119+
"name": "projectVersioningBundleVersionMinor",
120+
"type": "string",
121+
"label": "Minor (Increment by / Set to)",
122+
"groupName": "versioning",
123+
"helpMarkDown": "Either the new value for the bundle minor version or the increment for the minor version to apply.",
124+
"visibleRule": "projectVersioningBundleVersionMode = increment || projectVersioningBundleVersionMode = set"
125+
},
126+
{
127+
"name": "projectVersioningBundleVersionPatch",
128+
"type": "string",
129+
"label": "Patch (Increment by / Set to)",
130+
"groupName": "versioning",
131+
"helpMarkDown": "Either the new value for the bundle patch version or the increment for the patch version to apply.",
132+
"visibleRule": "projectVersioningBundleVersionMode = increment || projectVersioningBundleVersionMode = set"
133+
},
134+
{
135+
"name": "projectVersioningBuildNumberMode",
136+
"type": "pickList",
137+
"label": "Build number mode",
138+
"defaultValue": "none",
139+
"helpMarkDown": "Define if and how to modify the project's build number.",
140+
"groupName": "versioning",
141+
"options": {
142+
"none": "None",
143+
"increment": "Increment build number",
144+
"set": "Set build number"
145+
}
146+
},
147+
{
148+
"name": "projectVersioningBuildNumber",
149+
"type": "string",
150+
"label": "Build number (Increment by / Set to)",
151+
"groupName": "versioning",
152+
"helpMarkDown": "Either the new value for the build number or the increment for the build number to apply.",
153+
"visibleRule": "projectVersioningBuildNumberMode = increment || projectVersioningBuildNumberMode = set"
154+
},
155+
{
156+
"name": "projectVersioningCommitChanges",
157+
"type": "boolean",
158+
"label": "Commit changes to repository",
159+
"defaultValue": true,
160+
"groupName": "versioning",
161+
"visibleRule": "projectVersioningBundleVersionMode != none || projectVersioningBuildNumberMode != none",
162+
"helpMarkDown": "(Optional) Commit the updated bundle version / build number to the repository."
163+
},
164+
{
165+
"name": "projectVersioningCommitChangesUserName",
166+
"type": "string",
167+
"label": "git user name",
168+
"groupName": "versioning",
169+
"defaultValue": "Azure Pipelines",
170+
"helpMarkDown": "The user name to use when commiting changes.",
171+
"visibleRule": "projectVersioningCommitChanges = true"
172+
},
173+
{
174+
"name": "projectVersioningCommitChangesUserMail",
175+
"type": "string",
176+
"label": "git user mail",
177+
"groupName": "versioning",
178+
"defaultValue": "agent@dev.azure.com",
179+
"helpMarkDown": "The user mail to use when commiting changes.",
180+
"visibleRule": "projectVersioningCommitChanges = true"
181+
},
182+
{
183+
"name": "projectVersioningCreateTag",
184+
"type": "boolean",
185+
"label": "Create a git tag for the changes",
186+
"defaultValue": true,
187+
"groupName": "versioning",
188+
"visibleRule": "projectVersioningCommitChanges = true",
189+
"helpMarkDown": "(Optional) Creates a git tag for the changeset."
190+
},
191+
{
192+
"name": "projectVersioningCreateTagPattern",
193+
"type": "string",
194+
"label": "git tag pattern",
195+
"groupName": "versioning",
196+
"defaultValue": "v{{bundleVersion}}",
197+
"helpMarkDown": "The pattern defines what the created git tag will look like. Valid placeholders are: {{bundleVersion}}, {{buildNumber}}",
198+
"visibleRule": "projectVersioningCreateTag = true"
199+
},
94200
{
95201
"name": "buildFlow",
96202
"type": "radio",
@@ -291,6 +397,7 @@
291397
"warningAlphaBetaVersion": "You are using a Unity Alpha/Beta version. It may not be supported by the extension!",
292398
"projectPathInfo": "Determining Unity editor version for project at",
293399
"successGetUnityEditorVersion": "Success, Unity editor version found",
294-
"failGetUnityEditorVersion": "Fail, Unity editor version not found"
400+
"failGetUnityEditorVersion": "\nERROR: Fail, Unity editor version not found",
401+
"taskResultFailedVersioning": "\nERROR: Failed during the project versioning process with exit code:"
295402
}
296-
}
403+
}

0 commit comments

Comments
 (0)