easyci 0.7.0 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93e85d54f39687dd87189fe75a8f2500e6ac30e6195b1579d0a9f26145a0d53e
4
- data.tar.gz: 844a0177557c48cbb462e7cb369e8c69c48e0b9d23b534593f5a388f1ddaee43
3
+ metadata.gz: 374fdb06d68deea572c4db1399efa7c711d936c5d246c0056406e2e2c5fcfab0
4
+ data.tar.gz: f87ade60583dfb86bb8d025ca717fa2c38e2d7f67ce8e07a1093a14d804eba18
5
5
  SHA512:
6
- metadata.gz: 23b253fac7ea57d0f50fdfca93b4108dc264a036307e42e2f124ff7467c4655856a8426fc289b4d76d8e437831595417c4220385f5b141a3aaca98ea0af37857
7
- data.tar.gz: 6acd0d3b11ed1c80b6cfddd59074df5b664c61edc56da7f2b1ee6f230edc18beceaf84655bd8b3c19565ca64115e8819fbea3c5d0992636656d46df4e6794694
6
+ metadata.gz: 5e632ad0c40b07a14eea58c8a379ff87d9f2f4a67b515f67262c0dcbdbfd99b9137210caba7b305c1c37c1274b9cfc043e5d31bea525bd100a17e67db683b562
7
+ data.tar.gz: ac9507a25aad1802a7fe204c3f8a5d6218753eb2c838c3ff53ea6ab4a841d1d8f3e9a4ba718131dc12e1be04f53c865a035a6f6029a402fc99097c9905164337
@@ -28,6 +28,7 @@ module EasyCI
28
28
 
29
29
  work_dir = File.expand_path('~/gitee_draw')
30
30
  gitee_repo = ENV['GITEE_REPO'] || 'fundesignexport/MagicSortDemoDesignExport'
31
+ gitee_repo_name = gitee_repo.split('/').last
31
32
  gitee_branch = ENV['GITEE_BRANCH'] || 'master'
32
33
 
33
34
  # 如果未提供runner-repo参数,使用默认值
@@ -40,6 +41,7 @@ module EasyCI
40
41
 
41
42
 
42
43
  puts "gitee_repo: #{gitee_repo}"
44
+ puts "gitee_repo_name: #{gitee_repo_name}"
43
45
  puts "gitee_branch: #{gitee_branch}"
44
46
  puts "work_dir: #{work_dir}"
45
47
 
@@ -64,15 +66,26 @@ module EasyCI
64
66
  if File.exist?(resources_dir)
65
67
  FileUtils.rm_rf(resources_dir)
66
68
  end
69
+ FileUtils.mkdir_p(File.join(runner_dir, 'Assets'))
67
70
  puts "下载截图仓库..."
68
71
  git_url = @use_https ? "https://gitee.com/#{gitee_repo}.git" : "git@gitee.com:#{gitee_repo}.git"
69
72
  puts "git_url: #{git_url}"
70
- clone_result = system("cd #{runner_dir} && git clone --depth 1 -b #{gitee_branch} #{git_url} Assets/Resources")
73
+ gitee_repo_local_path = File.join(work_dir, gitee_repo_name)
74
+ FileUtils.rm_rf(gitee_repo_local_path) if File.exist?(gitee_repo_local_path)
75
+ clone_result = system("cd #{work_dir} && git clone --depth 1 -b #{gitee_branch} #{git_url} #{gitee_repo_name}")
71
76
 
72
77
  unless clone_result
73
78
  puts "克隆Assets仓库失败,请检查网络和权限设置"
74
79
  exit 1
75
80
  end
81
+
82
+ if !File.exist?(File.join(gitee_repo_local_path, 'Resources'))
83
+ FileUtils.mkdir_p(resources_dir)
84
+ FileUtils.mv(File.join(gitee_repo_local_path, '2D'), File.join(resources_dir, '2D'))
85
+ FileUtils.mv(File.join(gitee_repo_local_path, 'Common/Font'), File.join(resources_dir, 'Fonts'))
86
+ else
87
+ FileUtils.mv(File.join(gitee_repo_local_path, 'Resources'), resources_dir)
88
+ end
76
89
 
77
90
  # 运行Unity截图任务
78
91
  unity_path = find_unity_path(runner_dir)
@@ -85,7 +98,7 @@ module EasyCI
85
98
  system("cd #{runner_dir} && find . -path \"*/Screenshots/*.png\" -exec pngquant --quality=70-95 --ext .png --force {} \\;")
86
99
  # 运行Node脚本(如果需要)
87
100
  puts "运行后处理脚本..."
88
- system("cd #{runner_dir} && docker run --rm -v \"$(pwd):/app\" -w /app node:22.0.0 bash -c \"cd Scripts && yarn install && npx ts-node index.ts\"")
101
+ system("cd #{runner_dir} && docker run --rm -v \"$(pwd):/app\" -w /app node:22.0.0 bash -c \"cd Scripts && export BUILD_FROM_PRO=#{gitee_repo_name} && yarn install && npx ts-node index.ts\"")
89
102
 
90
103
  end
91
104
 
@@ -1,3 +1,3 @@
1
1
  module EasyCI
2
- VERSION = '0.7.0'
2
+ VERSION = '0.9.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easyci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wade