easyci 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/easyci/command/unitydraw.rb +13 -9
- data/lib/easyci/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 927c11e2ae3813933d519a94a1aa87829c8533531ea18e1b5f19918940d270d0
|
4
|
+
data.tar.gz: 7812db007b9d28d84b2cfdadadb5dcfa89e7187afda561ac2670f001e69c839e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c07ea450495999224cdf041ec0b7b043744fcf97255939f130a8ff81b093a07f6b821cbd500a81dc3b31646c4ffc19d14d3efdc8631fa07a163d1862d385f468
|
7
|
+
data.tar.gz: b4bebdd9becd4cef79a218ae782a92613ec60fa39b179b355ec0c4ce04a392b98cab01795a597d98046bb07bf32cd128a74b7b417c608b11db1f699402e7e69c
|
@@ -9,12 +9,14 @@ module EasyCI
|
|
9
9
|
def self.options
|
10
10
|
[
|
11
11
|
['--runner-repo=REPO', 'Runner仓库路径,例如:mygroup/FGUIWorkRunner'],
|
12
|
+
['--https', '使用HTTPS方式克隆仓库,默认使用SSH方式'],
|
12
13
|
].concat(super)
|
13
14
|
end
|
14
15
|
|
15
16
|
def initialize(argv)
|
16
17
|
super
|
17
18
|
@runner_repo = argv.option('runner-repo')
|
19
|
+
@use_https = argv.flag?('https', false)
|
18
20
|
end
|
19
21
|
|
20
22
|
def validate!
|
@@ -28,10 +30,8 @@ module EasyCI
|
|
28
30
|
gitee_repo = ENV['GITEE_REPO'] || 'fundesignexport/MagicSortDemoDesignExport'
|
29
31
|
gitee_branch = ENV['GITEE_BRANCH'] || 'master'
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
exit 1
|
34
|
-
end
|
33
|
+
# 如果未提供runner-repo参数,使用默认值
|
34
|
+
@runner_repo ||= ENV['GITEE_REPO'] || 'bestwebprimary/FGUIWorkRunner'
|
35
35
|
|
36
36
|
if gitee_repo.empty? || gitee_branch.empty?
|
37
37
|
puts "GITEE_REPO 和 GITEE_BRANCH 不能为空"
|
@@ -47,7 +47,9 @@ module EasyCI
|
|
47
47
|
FileUtils.mkdir_p(work_dir)
|
48
48
|
runner_dir = File.join(work_dir, 'FGUIWorkRunner')
|
49
49
|
FileUtils.rm_rf(runner_dir) if File.exist?(runner_dir)
|
50
|
-
|
50
|
+
git_url = @use_https ? "https://gitee.com/#{@runner_repo}.git" : "git@gitee.com:#{@runner_repo}.git"
|
51
|
+
puts "git_url: #{git_url}"
|
52
|
+
clone_runner_result = system("cd #{work_dir} && git clone --depth 1 -b #{gitee_branch} #{git_url} FGUIWorkRunner")
|
51
53
|
unless clone_runner_result
|
52
54
|
puts "克隆Runner仓库失败,请检查网络和权限设置"
|
53
55
|
exit 1
|
@@ -63,18 +65,20 @@ module EasyCI
|
|
63
65
|
FileUtils.rm_rf(resources_dir)
|
64
66
|
end
|
65
67
|
puts "下载截图仓库..."
|
66
|
-
|
67
|
-
|
68
|
+
git_url = @use_https ? "https://gitee.com/#{gitee_repo}.git" : "git@gitee.com:#{gitee_repo}.git"
|
69
|
+
puts "git_url: #{git_url}"
|
70
|
+
clone_result = system("cd #{runner_dir} && git clone --depth 1 -b #{gitee_branch} #{git_url} Assets/Resources")
|
71
|
+
|
68
72
|
unless clone_result
|
69
73
|
puts "克隆Assets仓库失败,请检查网络和权限设置"
|
70
74
|
exit 1
|
71
75
|
end
|
72
76
|
|
73
77
|
# 运行Unity截图任务
|
74
|
-
puts "运行Unity截图任务..."
|
75
78
|
unity_path = find_unity_path(runner_dir)
|
79
|
+
puts "运行Unity截图任务..."
|
76
80
|
FileUtils.chdir(runner_dir)
|
77
|
-
system("#{unity_path} -projectPath . -executeMethod
|
81
|
+
system("#{unity_path} -projectPath . -executeMethod SpineAutoImporter.CIRunner -logFile screenshot-log.txt")
|
78
82
|
|
79
83
|
# 压缩截图
|
80
84
|
puts "开始压缩截图..."
|
data/lib/easyci/version.rb
CHANGED