Skip to content

Commit e94e8e7

Browse files
committed
Check the arg first
1 parent a6ee5ec commit e94e8e7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

script/enterprise-backport

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
require 'tmpdir'
88

9-
VERSION = ARGV[0].dup # like, 11.10.340
10-
11-
BRANCH_NAME = "backport-docs-for-#{VERSION}"
12-
13-
Dir.glob('tasks/*.rake').each { |r| load r }
14-
159
if ARGV.length != 1
1610
error = '''Error: Run the script like this: bundle exec script/enterprise-backport [VERSION]
1711
e.g. bundle exec script/enterprise-cutter 2.0
1812
'''
1913
abort error
2014
end
2115

16+
VERSION = ARGV[0].dup # like, 11.10.340
17+
18+
BRANCH_NAME = "backport-docs-for-#{VERSION}"
19+
20+
Dir.glob('tasks/*.rake').each { |r| load r }
21+
2222
setup
2323

2424
temp_dir = Dir.mktmpdir

0 commit comments

Comments
 (0)