Skip to content

Commit

Permalink
Merge branch 'release/v7.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
robinnorth committed Oct 3, 2023
2 parents e180f89 + 1bf8ee6 commit ebc2e3c
Show file tree
Hide file tree
Showing 35 changed files with 631 additions and 230 deletions.
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- ## [Unreleased] -->

## [7.0.0] - 2023-10-03

### Added

- Double-click settings assets to assign them as the active settings in the SuperUnityBuild window. (by [@RobProductions](https://github.com/RobProductions))
- Customize app build name. (by [@RobProductions](https://github.com/RobProductions))
- Customize `BuildConstants` file path. (by [@RobProductions](https://github.com/RobProductions))

### Changed

- **Breaking change:** Namespaced generated `BuildConstants` class and enums, added `BuildConstants.scriptingBackend` constant.
- Remove redundant `dataDirNameFormat` variable from Build Platforms.
- Renamed 'Per-Platform' Build Action type to 'Per-Build' to reflect when they are run.
- Enhanced support for string token usage in Build Action configurations. Per-Build actions have gained support for `$BASEPATH` and `$BUILDPATH`, whilst Single Run actions can now use `$VERSION`, `$BUILD`, `$YEAR`, `$MONTH`, `$DAY` and `$TIME`, with the time-based tokens corresponding to the time at which the action was run.
- Scene list UI overhaul. (by [@RobProductions](https://github.com/RobProductions))
- Release list UI overhaul. (by [@RobProductions](https://github.com/RobProductions))
- Streamline UI colors. (by [@RobProductions](https://github.com/RobProductions))
- Replaced the 'Open SuperUnityBuild' button shown in the Inspector for settings assets with new 'Open in SuperUnityBuild' button to assign them as the active settings in the SuperUnityBuild window. (by [@RobProductions](https://github.com/RobProductions))

### Fixed

- Remove dependency on .NET Standard 2.1. (by [@RobProductions](https://github.com/RobProductions))
- Fix scripting backend not being restored after build. (by [@RobProductions](https://github.com/RobProductions))

## [6.0.1] - 2023-05-26

### Fixed
Expand Down Expand Up @@ -235,7 +259,8 @@ This release includes all changes from 1.0.0 pre-releases ([1.0.0-pre.1](#100-pr
- Fixed issue in Linux build name moving `binaryName` to `BuildArchitecture`. [PR #41](https://github.com/superunitybuild/buildtool/pull/41)
- Fixed an issue where custom defines were overwrite when build was finished. [Issue #36](https://github.com/superunitybuild/buildtool/issues/36)

[unreleased]: https://github.com/superunitybuild/buildtool/compare/v6.0.1...HEAD
[unreleased]: https://github.com/superunitybuild/buildtool/compare/v7.0.0...HEAD
[7.0.0]: https://github.com/superunitybuild/buildtool/compare/v6.0.1...v7.0.0
[6.0.1]: https://github.com/superunitybuild/buildtool/compare/v6.0.0...v6.0.1
[6.0.0]: https://github.com/superunitybuild/buildtool/compare/v5.0.4...v6.0.0
[5.0.4]: https://github.com/superunitybuild/buildtool/compare/v5.0.3...v5.0.4
Expand Down
28 changes: 23 additions & 5 deletions Editor/Build/Action/BuildAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public class BuildAction : ScriptableObject // This really should be an abstract
public enum ActionType
{
SingleRun,
PerPlatform
PerBuild
}

public ActionType actionType = ActionType.PerPlatform;
public ActionType actionType = ActionType.PerBuild;
public string actionName = string.Empty;
public string note = string.Empty;
public bool actionEnabled = true;
Expand All @@ -40,6 +40,24 @@ public virtual void PerBuildExecute(
{
}

public static string ResolveExecuteTokens(string prototype)
{
DateTime runTime = DateTime.Now;

prototype = TokensUtility.ResolveBuildTimeTokens(prototype, runTime);
prototype = TokensUtility.ResolveBuildVersionTokens(prototype);

return prototype;
}

public static string ResolvePerBuildExecuteTokens(string prototype, BuildReleaseType releaseType, BuildPlatform platform, BuildArchitecture architecture, BuildScriptingBackend scriptingBackend, BuildDistribution distribution, DateTime buildTime, string buildPath)
{
prototype = TokensUtility.ResolveBuildOutputTokens(prototype, buildPath);
prototype = TokensUtility.ResolveBuildConfigurationTokens(prototype, releaseType, platform, architecture, scriptingBackend, distribution, buildTime);

return prototype;
}

public void Draw(SerializedObject obj)
{
DrawProperties(obj);
Expand All @@ -57,7 +75,7 @@ public void Draw(SerializedObject obj)
else if (isPreBuildAction || isPostBuildAction)
actionType = ActionType.SingleRun;
else if (isPreBuildPerPlatformAction || isPostBuildPerPlatformAction)
actionType = ActionType.PerPlatform;
actionType = ActionType.PerBuild;

if (actionTypeSelectable)
actionType = (ActionType)EditorGUILayout.EnumPopup("Action Type", actionType);
Expand All @@ -67,8 +85,8 @@ public void Draw(SerializedObject obj)

EditorGUILayout.PropertyField(obj.FindProperty("note"));

// Only Per-Platform actions can be filtered
if (actionType == ActionType.PerPlatform)
// Only Per-Build actions can be filtered
if (actionType == ActionType.PerBuild)
EditorGUILayout.PropertyField(obj.FindProperty("filter"), GUILayout.Height(0));

obj.ApplyModifiedProperties();
Expand Down
2 changes: 1 addition & 1 deletion Editor/Build/Action/UI/BuildActionListDrawer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
Expand Down
Loading

0 comments on commit ebc2e3c

Please sign in to comment.