From 4dc331d4c00513bcb880cbe8dcd9387286b9945e Mon Sep 17 00:00:00 2001 From: Sichan Yoo Date: Fri, 4 Oct 2024 11:51:22 -0700 Subject: [PATCH] Uncomment temporarily commented logic for generating empty manfiest if repo has no changes. --- .../Subcommands/PrepareRelease.swift | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/PrepareRelease.swift b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/PrepareRelease.swift index b1f58b72234..1d21c45ea1c 100644 --- a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/PrepareRelease.swift +++ b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/PrepareRelease.swift @@ -81,16 +81,16 @@ struct PrepareRelease { try FileManager.default.changeWorkingDirectory(repoPath) let previousVersion = try getPreviousVersion() -// guard try repoHasChanges(previousVersion) else { -// /// If repo has no changes, create an empty release-manifest.json file. -// /// Empty manifest file makes GitHubReleasePublisher be no-op. -// /// The manifest file is required regardless of whether there should -// /// be a release or not. -// try createEmptyReleaseManifest() -// /// Return without creating new commit or tag in local repos. -// /// This makes GitPublisher be no-op. -// return -// } + guard try repoHasChanges(previousVersion) else { + /// If repo has no changes, create an empty release-manifest.json file. + /// Empty manifest file makes GitHubReleasePublisher be no-op. + /// The manifest file is required regardless of whether there should + /// be a release or not. + try createEmptyReleaseManifest() + /// Return without creating new commit or tag in local repos. + /// This makes GitPublisher be no-op. + return + } let newVersion = try createNewVersion(previousVersion) try stageFiles()