-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt publish command for multi-variant packages (#431)
* Update octokit * Handle multi-variant packages for publish * Update tests * Fix tests * Remove unused code * Fix upstream version * Increase version for variants * Update flags description * Renamed file to file name for content-hash * Remove comment * Squashed commit of the following: commit cfbdb0f Author: dappnodedev <[email protected]> Date: Tue Jun 18 17:28:29 2024 +0200 0.3.24 commit 2ff654a Author: dappnodedev <[email protected]> Date: Tue Jun 18 17:21:54 2024 +0200 Bugfix: Create Github releases (#434) * Bump octokit version * Fix Github release creation * Update all github requests * Do not upload release assets * Use octokit.rest * Improve Github error handling commit cc60a42 Author: dappnodedev <[email protected]> Date: Fri Jun 14 16:17:01 2024 +0200 0.3.23 commit 93ebd23 Author: dappnodedev <[email protected]> Date: Fri Jun 14 16:05:05 2024 +0200 Fix build for new upstream format (#433) * Fix build for new upstream format * Compare with string status 404 (not number) * Update remote IPFS API for tests * Fix BuildVariantsMap import * Add "NoThrow" to the generate release notes function * Copy prometheus targets to release dir * Handle variant dir not existent * Declare var outside switch * SImplify release body
- Loading branch information
1 parent
cfbdb0f
commit c36e00a
Showing
39 changed files
with
793 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,7 +202,7 @@ export class Github { | |
owner: this.owner, | ||
repo: this.repo, | ||
tag_name: tag, | ||
name: tag, | ||
name: this.buildReleaseNameFromTag(tag), | ||
body, | ||
prerelease, | ||
generate_release_notes: true, | ||
|
@@ -216,6 +216,29 @@ export class Github { | |
}); | ||
} | ||
|
||
/** | ||
* Receives a tag and returns a prettified release name | ||
* | ||
* For single-variant packages: | ||
* Tag: "v0.2.0" => Release name: "v0.2.0" | ||
* | ||
* For multi-variant packages: | ||
* Tag: "[email protected][email protected][email protected]" => Release name: "Gnosis(v0.1.2), Holesky(v1.2.3), Mainnet(v3.21.1)" | ||
* | ||
* @param tag | ||
*/ | ||
private buildReleaseNameFromTag(tag: string): string { | ||
const variants = tag.split("_").map(variant => { | ||
const [name, version] = variant.split("@"); | ||
|
||
// If the variant is a single-variant package | ||
if (!version) return name; | ||
|
||
return `${name}(${version})`; | ||
}); | ||
return variants.join(", "); | ||
} | ||
|
||
/** | ||
* Open a Github pull request | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.