Skip to content

Commit c6636a4

Browse files
committed
Revert "add flag to skip version check for release candidate versions"
This reverts commit 6dbc608.
1 parent 6dbc608 commit c6636a4

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

script/release

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
33

4-
#/ Usage: release [--dry-run] [--skip-version-bump-check] <version> [min_version]
4+
#/ Usage: release [--dry-run] <version> [min_version]
55
#/
66
#/ Publish a backup-utils release:
77
#/ * Updates the package changelog
@@ -196,7 +196,7 @@ end
196196

197197
def bump_version(new_version, min_version = nil, path = 'share/github-backup-utils/version')
198198
current_version = Gem::Version.new(File.read(path).strip.chomp)
199-
if !@skip_version_bump_check && (Gem::Version.new(new_version) < current_version)
199+
if Gem::Version.new(new_version) < current_version
200200
raise "New version should be newer than #{current_version}"
201201
end
202202
File.open("#{path}.new", 'w') { |f| f.puts new_version }
@@ -338,7 +338,6 @@ if $PROGRAM_NAME == __FILE__
338338
begin
339339
args = ARGV.dup
340340
dry_run = false
341-
skip_version_bump_check = false
342341
if args.include?('--dry-run')
343342
dry_run = true
344343
args.delete '--dry-run'
@@ -349,12 +348,7 @@ if $PROGRAM_NAME == __FILE__
349348
args.delete '--no-warn'
350349
end
351350

352-
if args.include?('--skip-version-bump-check')
353-
@skip_version_bump_check = true
354-
args.delete '--skip-version-bump-check'
355-
end
356-
357-
raise 'Usage: release [--dry-run] [--skip-version-bump-check] <version> [min_version]' if args.empty?
351+
raise 'Usage: release [--dry-run] <version> [min_version]' if args.empty?
358352

359353
begin
360354
version = Gem::Version.new(args[0])

0 commit comments

Comments
 (0)