Skip to content

Commit 9a700e2

Browse files
committed
[rust] rust wants nightlies marked with dash not dot
1 parent 16fd13b commit 9a700e2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Rakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,20 +903,21 @@ namespace :rust do
903903
task :version, [:version] do |_task, arguments|
904904
old_version = rust_version.dup
905905
equivalent_version = if old_version.include?('nightly')
906-
old_version.split('.')[0...-1].tap(&:shift).append('0').append('nightly').join('.')
906+
"#{old_version.split(/\.|-/)[0...-1].tap(&:shift).join('.')}.0-nightly"
907907
else
908908
old_version.split('.').tap(&:shift).append('0').join('.')
909909
end
910910
converted_version = updated_version(equivalent_version, arguments[:version])
911911
new_version = converted_version.split('.').unshift("0").tap(&:pop).join('.')
912-
new_version += '.nightly' unless old_version.include?('nightly')
912+
new_version += '-nightly' unless old_version.include?('nightly')
913913

914914
['rust/Cargo.toml', 'rust/BUILD.bazel'].each do |file|
915915
text = File.read(file).gsub(old_version, new_version)
916916
File.open(file, "w") { |f| f.puts text }
917917
end
918918

919919
Rake::Task['rust:changelog'].invoke unless new_version.include?('nightly')
920+
Rake::Task['rust:update'].invoke
920921
end
921922
end
922923

rust/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ rust_binary(
7777
name = "selenium-manager",
7878
srcs = ["src/main.rs"],
7979
edition = "2021",
80-
version = "0.4.17.nightly",
80+
version = "0.4.17-nightly",
8181
visibility = ["//visibility:public"],
8282
deps = [
8383
":selenium_manager",

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "selenium-manager"
3-
version = "0.4.17.nightly" # don't forget to update rust/BUILD.bazel
3+
version = "0.4.17-nightly" # don't forget to update rust/BUILD.bazel
44
edition = "2021"
55
authors = ["Selenium <[email protected]"]
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)