Skip to content

Commit 1873e10

Browse files
authored
Publish: Use package name minus "spl-" instead of dir for tag (solana-program#55)
Publish: Use package name minus "spl-" instead of dir #### Problem The repo has some nested packages, such as `program-error/derive`, but the publish script will use the basename for the tag name. This means that we'll publish a tag called `derive`, rather than `program-error-derive`. #### Summary of changes Change the tag name to the package name minus `spl-`. Also, the publish commit is a generic message, so customize it.
1 parent 04c5d9b commit 1873e10

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ nightly = "nightly-2024-11-22"
1919

2020
[workspace.metadata.spellcheck]
2121
config = "scripts/spellcheck.toml"
22+
23+
[workspace.metadata.release]
24+
pre-release-commit-message = "Publish {{crate_name}} v{{version}}"
25+
tag-message = "Publish {{crate_name}} v{{version}}"
26+
consolidate-commits = false

scripts/rust/publish.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cd(path.join(workingDirectory, folder));
1616
const packageToml = getCargo(folder).package;
1717
const oldVersion = packageToml.version;
1818
const packageName = packageToml.name;
19-
const tagName = path.basename(folder);
19+
const tagName = packageName.replace(/spl-/, '');
2020

2121
// Publish the new version, commit the repo change, tag it, and push it all.
2222
const releaseArgs = dryRun

0 commit comments

Comments
 (0)