Skip to content

Commit

Permalink
Fix publish failing if no current-version tag exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Exidex committed Oct 20, 2024
1 parent 6299aa6 commit bfa1cd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ For changes in main application see [separate CHANGELOG.md](https://github.com/p

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to Semantic Versioning Convention

## [0.9.0] - 2024-10-20
- Fixed `publish` failing if no `current-version` tag exists on remote

## [0.8.0] - 2024-10-13
- Added `entrypoint.icon` plugin manifest property that accepts path to image inside plugin's `assets` directory
- **BREAKING CHANGE**: Plugin permissions reworked. See [main application CHANGELOG.md](https://github.com/project-gauntlet/gauntlet/blob/main/CHANGELOG.md) for version v10
Expand Down
8 changes: 6 additions & 2 deletions src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ export async function publish() {
console.log("Tagging current version...")
await cloneGit.raw('tag', '--force', 'current-version', commitHash)

console.log("Removing remote tag...")
await cloneGit.push(['--set-upstream', '--delete', 'origin', 'current-version'])
try {
console.log("Removing remote tag...")
await cloneGit.push(['--set-upstream', '--delete', 'origin', 'current-version'])
} catch (ignore) {
// this failing means tag doesn't exist on remote
}

console.log("Pushing to 'origin' remote...")
// push
Expand Down

0 comments on commit bfa1cd9

Please sign in to comment.