Skip to content

Commit b65f93a

Browse files
committed
Actually publish the version as a snapshot version
1 parent f2b2ac6 commit b65f93a

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

scripts/build-rust-for-target.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def execute_build_script(script_directory: str, sdk_path: str, module: Module, t
111111
build_version_file_path = get_build_version_file_path(args.module, project_root)
112112
major, minor, patch = read_version_numbers_from_kotlin_file(build_version_file_path)
113113

114-
if 'SNAPSHOT' in args.version:
114+
if args.version.endswith("-SNAPSHOT"):
115115
print(f"Version {args.version} is a SNAPSHOT version, skipping version check")
116116
elif is_provided_version_higher(major, minor, patch, args.version):
117117
print(

scripts/publish-module.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ signing {
5353
rootProject.ext["signing.password"],
5454
)
5555
sign publishing.publications
56+
required { !PUBLISH_VERSION.endsWith("-SNAPSHOT") }
5657
}

scripts/publish-root.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,7 @@ nexusPublishing {
3131
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
3232
}
3333
}
34+
useStaging.convention(project.provider {
35+
!project.hasProperty("snapshot")
36+
})
3437
}

scripts/release_sdk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def main(args: argparse.Namespace):
214214
get_publish_task(args.module),
215215
)
216216

217-
if not 'SNAPSHOT' in args.version:
217+
if not args.version.endswith("-SNAPSHOT"):
218218
# Success, commit and push changes, then create github release
219219
commit_message = f"Bump {args.module.name} version to {args.version} (matrix-rust-sdk to {args.linkable_ref})"
220220
print(f"Commit message: {commit_message}")

0 commit comments

Comments
 (0)