Skip to content

Commit

Permalink
use behavior instead of Disable property for Versioning Behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Jul 5, 2021
1 parent c6f70ca commit 5b37696
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions docs/schemas/v2/buildtools.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@
"versionOffset": {
"description": "If you need to offset from your build number, you may want to set the Version Offset to get a version that will work for you.",
"type": "integer"
},
"disable": {
"description": "Disables this Mobile.BuildTools Task",
"type": [
"boolean",
"null"
],
"default": false
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Mobile.BuildTools.Models
{
public class AutomaticVersioning : ToolItem
public class AutomaticVersioning
{
[DefaultValue(VersionBehavior.PreferBuildNumber)]
[Description("Sets the default behavior for versioning the app. By default the Mobile.BuildTools will attempt to use a Build number and will fallback to a timestamp.")]
Expand Down
2 changes: 1 addition & 1 deletion src/Mobile.BuildTools/Tasks/LocateBuildToolsConfigTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public override bool Execute()

// Only run these tasks for Android and iOS projects if they're not explicitly disabled
EnableArtifactCopy = !crossTargetingProject && IsEnabled(configuration?.ArtifactCopy) && isPlatformHead;
EnableAutomaticVersioning = !crossTargetingProject && IsEnabled(configuration?.AutomaticVersioning) && isPlatformHead;
EnableAutomaticVersioning = !crossTargetingProject && configuration.AutomaticVersioning is not null && configuration.AutomaticVersioning.Behavior != VersionBehavior.Off && isPlatformHead;
EnableImageProcessing = !crossTargetingProject && IsEnabled(configuration?.Images) && (platform == Platform.iOS || platform == Platform.Android);
EnableTemplateManifests = !crossTargetingProject && IsEnabled(configuration?.Manifests) && isPlatformHead;
EnableReleaseNotes = IsEnabled(configuration?.ReleaseNotes) && isPlatformHead && EnvironmentAnalyzer.IsInGitRepo(ProjectDir);
Expand Down

0 comments on commit 5b37696

Please sign in to comment.