Skip to content

Commit d653ee6

Browse files
committed
temp: add debug logging
1 parent 250c7c8 commit d653ee6

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

scripts/release.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,38 +206,54 @@ val releaseCommand = object: CliktCommand(name = "release") {
206206

207207
CommandLine.executeOrFail(File(hstracker_dir), "sentry-cli debug-files upload --auth-token ${KintaEnv.getOrFail("SENTRY_TOKEN")} --include-sources --org hearthsim --project hstracker archive/${changelogVersion}/HSTracker.dSYMs.zip")
208208

209+
println("Sentry upload completed")
210+
209211
val changelogFile = File("$releaseDir/release_notes.md")
210212
changelogFile.writeText(changelog.first().markdown)
211213

214+
println("Creating GitHub release...")
212215
CommandLine.executeOrFail(
213216
File(hstracker_dir),
214217
"gh release create $changelogVersion $hstrackerAppZipPath --draft --notes-file ${changelogFile.absolutePath} --title $changelogVersion"
215218
)
219+
println("GitHub release created successfully")
216220

217221

218222
val generateAppcast = "${KintaEnv.getOrFail("SPARKLE_DIR")}/bin/generate_appcast"
219223

224+
println("Clearing Sparkle cache...")
220225
// not sure why we need to remove the sparkle cache but we do else it reuses previous versions
221226
CommandLine.executeOrFail(File(hstracker_dir), "rm -rf ${System.getenv("HOME")}/Library/Caches/Sparkle_generate_appcast/")
227+
println("Generating appcast...")
222228
// generateAppCast will output some warnings, that's ok at this point
223229
// Warning: Private key not found in the Keychain (-25300). Please run the generate_keys tool
224230
// Could not unarchive /Users/martin/git/HSTracker/archive/2019_6_6/options.plist Error Domain=SUSparkleErrorDomain Code=3000 "Not a supported archive format: file:///Users/martin/Library/Caches/Sparkle_generate_appcast/options.plist.tmp/options.plist" UserInfo={NSLocalizedDescription=Not a supported archive format: file:///Users/martin/Library/Caches/Sparkle_generate_appcast/options.plist.tmp/options.plist}
225231
CommandLine.executeOrFail(File(hstracker_dir), "$generateAppcast $releaseDir")
232+
println("Appcast generated successfully")
226233

227234
val hsdecktracker_net_dir = File(KintaEnv.getOrFail("HSDECKTRACKER_DIR"))
228235

236+
println("Checking out master branch...")
229237
CommandLine.executeOrFail(hsdecktracker_net_dir, "git checkout master")
238+
println("Pulling latest changes...")
230239
CommandLine.executeOrFail(hsdecktracker_net_dir, "git pull")
240+
println("Stashing changes...")
231241
CommandLine.executeOrFail(hsdecktracker_net_dir, "git stash")
232242
updateAppCast(marketingVersion, changelog.first().markdown)
233243

234244
val branchName = "appcast-update-$marketingVersion"
245+
println("Creating branch $branchName...")
235246
CommandLine.executeOrFail(hsdecktracker_net_dir, "git checkout -b $branchName")
247+
println("Adding appcast changes...")
236248
CommandLine.executeOrFail(hsdecktracker_net_dir, "git add hstracker/appcast2.xml")
249+
println("Committing changes...")
237250
CommandLine.executeOrFail(hsdecktracker_net_dir, "git commit -m \"HSTracker $marketingVersion\"")
251+
println("Pushing branch...")
238252
CommandLine.executeOrFail(hsdecktracker_net_dir, "git push -u origin $branchName")
239253

254+
println("Creating pull request...")
240255
CommandLine.executeOrFail(hsdecktracker_net_dir, "gh pr create --title \"HSTracker $marketingVersion\" --base master --fill")
256+
println("Release process completed successfully!")
241257
}
242258
}
243259

0 commit comments

Comments
 (0)