Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Tasks/UnityBuild/UnityBuildV3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.4.0]

### Added

- 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

## [3.3.0]

### Added
Expand Down Expand Up @@ -112,4 +118,4 @@ Maintenance release
### Removed

- 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
- 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
- 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
21 changes: 21 additions & 0 deletions Tasks/UnityBuild/UnityBuildV3/build-platform.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export enum BuildPlatform {
Standalone = "standalone",
Windows32 = "Win",
Windows64 = "Win64",
OSXUniversal = "OSXUniversal",
Linux = "Linux",
Linux64 = "Linux64",
LinuxUniversal = "LinuxUniversal",
IOS = "iOS",
Android = "Android",
Web = "Web",
WebStreamed = "WebStreamed",
WebGL = "WebGL",
XboxOne = "XboxOne",
PS4 = "PS4",
WindowsStoreApps = "WindowsStoreApps",
Switch = "Switch",
N3DS = "N3DS",
TVOS = "tvOS",
VisionOS = "visionos",
}
56 changes: 38 additions & 18 deletions Tasks/UnityBuild/UnityBuildV3/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Tasks/UnityBuild/UnityBuildV3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dinomite-studios/unity-build-task",
"version": "3.3.0",
"version": "3.4.0",
"description": "An Azure Pipelines task to build Unity projects.",
"main": "unity-build.js",
"scripts": {
Expand All @@ -21,8 +21,8 @@
"@types/fs-extra": "^9.0.6",
"@types/node": "^22.9.1",
"@types/q": "^1.5.8",
"@dinomite-studios/unity-azure-pipelines-tasks-lib": "^1.0.11",
"azure-pipelines-task-lib": "^4.17.3",
"@dinomite-studios/unity-azure-pipelines-tasks-lib": "^1.1.3",
"azure-pipelines-task-lib": "^5.1.0",
"fs-extra": "^8.1.0"
},
"devDependencies": {
Expand Down
140 changes: 134 additions & 6 deletions Tasks/UnityBuild/UnityBuildV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
"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)",
"category": "Azure Pipelines",
"preview": false,
"visibility": [
"Build"
],
"visibility": ["Build"],
"author": "Dinomite",
"version": {
"Major": 3,
"Minor": 3,
"Minor": 4,
"Patch": 0
},
"releaseNotes": "[Full Changelog](https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks/blob/master/Tasks/UnityBuild/UnityBuildV3/CHANGELOG.md)",
Expand All @@ -24,6 +22,11 @@
"displayName": "General",
"isExpanded": true
},
{
"name": "versioning",
"displayName": "Versioning",
"isExpanded": true
},
{
"name": "build",
"displayName": "Build",
Expand Down Expand Up @@ -91,6 +94,118 @@
"required": false,
"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."
},
{
"name": "projectVersioningBundleVersionMode",
"type": "pickList",
"label": "Bundle versioning mode",
"defaultValue": "none",
"helpMarkDown": "Define if and how to modify the project's bundle version.",
"groupName": "versioning",
"options": {
"none": "None",
"increment": "Increment bundle version",
"set": "Set bundle version"
}
},
{
"name": "projectVersioningBundleVersionMajor",
"type": "string",
"label": "Major (Increment by / Set to)",
"groupName": "versioning",
"helpMarkDown": "Either the new value for the bundle major version or the increment for the major version to apply.",
"visibleRule": "projectVersioningBundleVersionMode = increment || projectVersioningBundleVersionMode = set"
},
{
"name": "projectVersioningBundleVersionMinor",
"type": "string",
"label": "Minor (Increment by / Set to)",
"groupName": "versioning",
"helpMarkDown": "Either the new value for the bundle minor version or the increment for the minor version to apply.",
"visibleRule": "projectVersioningBundleVersionMode = increment || projectVersioningBundleVersionMode = set"
},
{
"name": "projectVersioningBundleVersionPatch",
"type": "string",
"label": "Patch (Increment by / Set to)",
"groupName": "versioning",
"helpMarkDown": "Either the new value for the bundle patch version or the increment for the patch version to apply.",
"visibleRule": "projectVersioningBundleVersionMode = increment || projectVersioningBundleVersionMode = set"
},
{
"name": "projectVersioningBuildNumberMode",
"type": "pickList",
"label": "Build number mode",
"defaultValue": "none",
"helpMarkDown": "Define if and how to modify the project's build number.",
"groupName": "versioning",
"options": {
"none": "None",
"increment": "Increment build number",
"set": "Set build number"
}
},
{
"name": "projectVersioningBuildNumber",
"type": "string",
"label": "Build number (Increment by / Set to)",
"groupName": "versioning",
"helpMarkDown": "Either the new value for the build number or the increment for the build number to apply.",
"visibleRule": "projectVersioningBuildNumberMode = increment || projectVersioningBuildNumberMode = set"
},
{
"name": "projectVersioningCommitChanges",
"type": "boolean",
"label": "Commit changes to repository",
"defaultValue": true,
"groupName": "versioning",
"visibleRule": "projectVersioningBundleVersionMode != none || projectVersioningBuildNumberMode != none",
"helpMarkDown": "(Optional) Commit the updated bundle version / build number to the repository."
},
{
"name": "projectVersioningCommitChangesUserName",
"type": "string",
"label": "git user name",
"groupName": "versioning",
"defaultValue": "Azure Pipelines",
"helpMarkDown": "The user name to use when commiting changes.",
"visibleRule": "projectVersioningCommitChanges = true"
},
{
"name": "projectVersioningCommitChangesUserMail",
"type": "string",
"label": "git user mail",
"groupName": "versioning",
"defaultValue": "agent@dev.azure.com",
"helpMarkDown": "The user mail to use when commiting changes.",
"visibleRule": "projectVersioningCommitChanges = true"
},
{
"name": "projectVersioningCommitChangesMessage",
"type": "string",
"label": "Commit message",
"groupName": "versioning",
"defaultValue": "Azure Pipelines Build - v{{bundleVersion}} ({{buildNumber}})",
"helpMarkDown": "The commit message. Valid placeholders are: {{bundleVersion}}, {{buildNumber}}",
"visibleRule": "projectVersioningCommitChanges = true"
},
{
"name": "projectVersioningCreateTag",
"type": "boolean",
"label": "Create a git tag for the changes",
"defaultValue": true,
"groupName": "versioning",
"visibleRule": "projectVersioningCommitChanges = true",
"helpMarkDown": "(Optional) Creates a git tag for the changeset."
},
{
"name": "projectVersioningCreateTagPattern",
"type": "string",
"label": "git tag pattern",
"groupName": "versioning",
"defaultValue": "v{{bundleVersion}}",
"helpMarkDown": "The pattern defines what the created git tag will look like. Valid placeholders are: {{bundleVersion}}, {{buildNumber}}",
"visibleRule": "projectVersioningCreateTag = true"
},
{
"name": "buildFlow",
"type": "radio",
Expand Down Expand Up @@ -273,6 +388,18 @@
{
"name": "editorLogFilePath",
"description": "Specifies the location of the editor log file generated."
},
{
"name": "bundleVersion",
"description": "The bundle version of the Unity project after the build."
},
{
"name": "buildNumber",
"description": "The build number of the Unity project after the build."
},
{
"name": "gitTag",
"description": "The git tag created for the changeset."
}
],
"execution": {
Expand All @@ -291,6 +418,7 @@
"warningAlphaBetaVersion": "You are using a Unity Alpha/Beta version. It may not be supported by the extension!",
"projectPathInfo": "Determining Unity editor version for project at",
"successGetUnityEditorVersion": "Success, Unity editor version found",
"failGetUnityEditorVersion": "Fail, Unity editor version not found"
"failGetUnityEditorVersion": "\nERROR: Fail, Unity editor version not found",
"taskResultFailedVersioning": "\nERROR: Failed during the project versioning process with exit code:"
}
}
}
Loading