u3d 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 199952a8dafdb71e6f683bee1f99524fdf9fb4b1
4
- data.tar.gz: fec612515c47bff5cac69eaeb6b02690f15d91ec
3
+ metadata.gz: a0c7e57e6b80d3937d00e39ce113ef2ba676983f
4
+ data.tar.gz: 8000266d69992a3f6e33a51b869174b9f08d6cba
5
5
  SHA512:
6
- metadata.gz: 659ef44c9f876b8f20f7b7cf9deeb53fbde68b404e150483b547ecbeb0ecfc9783405e249531f123a4f4b1a02cee4a272b92b644e358dae7bfe6217ed57878c9
7
- data.tar.gz: 4c3e390741a69b465b0d2298e158485203c319539989687989de6fba9e03039eb53ad5715949e76398d43514507d1d57c2159968a839ebea2b1e30a1a8393368
6
+ metadata.gz: c71fa8f7124dcb6bd941feb32727c01e24b9b967c6c1a1065c05df1f779bbb058a94b196f0402f0dcf7df7341913302575026fc6403ff9573c8f6d9eea807147
7
+ data.tar.gz: 135902654a913d2a7bdbce289a330d2bb9409ee07fd7df3d07c2b0f6c6de1bce8d89d161df2372d7fd5281acde8adb538b8af9378a9678f9e84f9b5910458e53
@@ -1,4 +1,4 @@
1
- future-release=v1.0.10
1
+ future-release=v1.0.11
2
2
  since-tag=v0.9
3
3
  exclude_tags_regex=v0\.[0-8]\..*
4
4
  exclude-labels=nochangelog
@@ -1,5 +1,17 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.0.11](https://github.com/DragonBox/u3d/tree/v1.0.11) (2017-12-07)
4
+ [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.10...v1.0.11)
5
+
6
+ **Implemented enhancements:**
7
+
8
+ - u3d/list: also detect previously installed deb packages on Linux \(fixes \#189\) [\#190](https://github.com/DragonBox/u3d/pull/190) ([lacostej](https://github.com/lacostej))
9
+
10
+ **Merged pull requests:**
11
+
12
+ - doc: explain CI setup with jenkins [\#191](https://github.com/DragonBox/u3d/pull/191) ([lacostej](https://github.com/lacostej))
13
+ - u3d/run: fail with a proper message when opening a Unity4 project [\#187](https://github.com/DragonBox/u3d/pull/187) ([lacostej](https://github.com/lacostej))
14
+
3
15
  ## [v1.0.10](https://github.com/DragonBox/u3d/tree/v1.0.10) (2017-11-03)
4
16
  [Full Changelog](https://github.com/DragonBox/u3d/compare/v1.0.9...v1.0.10)
5
17
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- u3d (1.0.10)
4
+ u3d (1.0.11)
5
5
  colored (>= 1.2, < 2.0.0)
6
6
  commander (>= 4.4.0, < 5.0.0)
7
7
  file-tail (>= 1.2.0)
@@ -133,4 +133,4 @@ DEPENDENCIES
133
133
  u3d!
134
134
 
135
135
  BUNDLED WITH
136
- 1.15.4
136
+ 1.16.0
data/README.md CHANGED
@@ -154,6 +154,9 @@ Here you have multiple options
154
154
 
155
155
  * if on Mac, use the keychain option (you set it before hand on the machine, e.g. from the command line using `u3d credentials` add (use `u3d credentials check` to verify) and then use `u3d install -k` to activate the keychain while installing.
156
156
 
157
+
158
+ For more information see also [how to use u3d to install Unity on a CI server](docs/ci_setup.md).
159
+
157
160
  ### Install ruby
158
161
 
159
162
  * __On MacOS and Linux:__
@@ -0,0 +1,75 @@
1
+ # CI Setup
2
+
3
+ ## Jenkins setup
4
+
5
+ Example of how to setup Jenkins to install unity automatically on multiple slaves
6
+
7
+ You might want to do things differently. Here are the decisions we took:
8
+
9
+ * we install all Unity versions in the same way (i.e. same Unity platform modules for all installs)
10
+ * we store the slave root passwords in the Jenkins credentials binding.
11
+ * we depend on RVM to be present on the slaves
12
+
13
+ Prerequisites:
14
+ * Install the same version of RVM on all slaves where you will install u3d
15
+ * add one root password credential per slave in the jenkins setup. Follow the "U3D_PASSWORD_$SLAVENAME" format
16
+
17
+ ![jenkins credentials](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_credentials.png)
18
+
19
+ Required plugins:
20
+ * [Credentials Binding Plugin](https://wiki.jenkins.io/display/JENKINS/Credentials+Binding+Plugin)
21
+ * [Parametrized Builds](https://wiki.jenkins.io/display/JENKINS/Parameterized+Build)
22
+ * [RVM Plugin](https://wiki.jenkins.io/display/JENKINS/RVM+Plugin)
23
+ * [ANSI Color plugin](https://wiki.jenkins.io/display/JENKINS/AnsiColor+Plugin)
24
+
25
+ Set up an install job:
26
+
27
+ * create a freestyle job
28
+
29
+ * Add a U3D_VERSION string parameter
30
+
31
+ ![jenkins version parameter](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_version_param.png)
32
+
33
+ * Configure the nodes you might want to install on as parameters
34
+
35
+ ![node parameter](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_version_node.png)
36
+
37
+ * Enable console coloring
38
+
39
+ ![console coloring](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_ansi.png)
40
+
41
+ * Enable RVM
42
+
43
+ ![console coloring](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_rvm.png)
44
+
45
+ * Configure the slave passwords
46
+
47
+ ![configure the slave passwords](https://github.com/DragonBox/u3d/raw/master/docs/assets/ci_jenkins_secret_passwords.png)
48
+
49
+
50
+ * add an "execute Shell" step
51
+ ```bash
52
+ # config. We could make this an option to the job. Or be project specific.
53
+ U3D_INSTALL_ARGS=-p Unity,Android,iOS,Linux,Windows,WebGL
54
+
55
+ # install or update u3d if it isn't already present
56
+ if [[ ! `which u3d` ]]; then
57
+ gem install u3d
58
+ else
59
+ gem update u3d
60
+ fi
61
+
62
+ echo "${U3D_INSTALL_ARGS}"
63
+
64
+ # display whether or not the slave has credentials stored
65
+ u3d credentials check
66
+
67
+ # fetch the password for the slave from the credentials
68
+ PASS_KEY=U3D_PASSWORD_${NODE_NAME}
69
+ echo "PASS KEY: ${PASS_KEY}"
70
+ export U3D_PASSWORD=${!PASS_KEY}
71
+
72
+ # install the specified version with the specified arguments
73
+ u3d install --trace --verbose $U3D_VERSION $U3D_INSTALL_ARGS
74
+ u3d list
75
+ ````
@@ -169,7 +169,7 @@ module U3d
169
169
  unless version # fall back in project default if we are on a Unity project
170
170
  version = up.editor_version if up.exist?
171
171
  unless version
172
- UI.user_error!('Not sure which version of Unity to run. Are you in a project?')
172
+ UI.user_error!('Not sure which version of Unity to run. Are you in a Unity5 or later project?')
173
173
  end
174
174
  end
175
175
 
@@ -106,10 +106,7 @@ module U3d
106
106
 
107
107
  def installed
108
108
  paths = (list_installed_paths + spotlight_installed_paths).uniq
109
- versions = paths.map { |path| MacInstallation.new(root_path: path) }
110
-
111
- # sorting should take into account stable/patch etc
112
- versions.sort! { |x, y| x.version <=> y.version }
109
+ paths.map { |path| MacInstallation.new(root_path: path) }
113
110
  end
114
111
 
115
112
  # rubocop:disable UnusedMethodArgument
@@ -206,11 +203,8 @@ module U3d
206
203
  end
207
204
 
208
205
  def installed
209
- find = File.join(DEFAULT_LINUX_INSTALL, 'unity-editor-*')
210
- versions = Dir[find].map { |path| LinuxInstallation.new(root_path: path) }
211
-
212
- # sorting should take into account stable/patch etc
213
- versions.sort! { |x, y| x.version <=> y.version }
206
+ paths = (list_installed_paths + debian_installed_paths).uniq
207
+ paths.map { |path| LinuxInstallation.new(root_path: path) }
214
208
  end
215
209
 
216
210
  # rubocop:disable UnusedMethodArgument
@@ -261,6 +255,24 @@ module U3d
261
255
  else
262
256
  UI.success "Successfully uninstalled '#{unity.root_path}'"
263
257
  end
258
+
259
+ private
260
+
261
+ def list_installed_paths
262
+ find = File.join(DEFAULT_LINUX_INSTALL, 'unity-editor-*', 'Editor')
263
+ paths = Dir[find]
264
+ paths = paths.map { |u| Pathname.new(u).parent.to_s }
265
+ UI.verbose "Found list_installed_paths: #{paths}"
266
+ paths
267
+ end
268
+
269
+ def debian_installed_paths
270
+ find = File.join(DEFAULT_LINUX_INSTALL, 'Unity', 'Editor')
271
+ paths = Dir[find]
272
+ paths = paths.map { |u| Pathname.new(u).parent.to_s }
273
+ UI.verbose "Found debian_installed_paths: #{paths}"
274
+ paths
275
+ end
264
276
  end
265
277
 
266
278
  class WindowsInstaller
@@ -279,10 +291,7 @@ module U3d
279
291
 
280
292
  def installed
281
293
  find = File.join(DEFAULT_WINDOWS_INSTALL, 'Unity*', 'Editor', 'Uninstall.exe')
282
- versions = Dir[find].map { |path| WindowsInstallation.new(root_path: File.expand_path('../..', path)) }
283
-
284
- # sorting should take into account stable/patch etc
285
- versions.sort! { |x, y| x.version <=> y.version }
294
+ Dir[find].map { |path| WindowsInstallation.new(root_path: File.expand_path('../..', path)) }
286
295
  end
287
296
 
288
297
  def install(file_path, version, installation_path: nil, info: {})
@@ -36,7 +36,9 @@ module U3d
36
36
 
37
37
  def editor_version
38
38
  require 'yaml'
39
- yaml = YAML.safe_load(File.read("#{@path}/ProjectSettings/ProjectVersion.txt"))
39
+ project_version = "#{@path}/ProjectSettings/ProjectVersion.txt"
40
+ return nil unless File.exist? project_version
41
+ yaml = YAML.safe_load(File.read(project_version))
40
42
  version = yaml['m_EditorVersion']
41
43
  version.gsub!(/(\d+\.\d+\.\d+)(?:x)?(\w\d+)(?:Linux)?/, '\1\2') if Helper.linux?
42
44
  version
@@ -21,7 +21,7 @@
21
21
  ## --- END LICENSE BLOCK ---
22
22
 
23
23
  module U3d
24
- VERSION = '1.0.10'.freeze
24
+ VERSION = '1.0.11'.freeze
25
25
  DESCRIPTION = 'Provides numerous tools for installing, managing and running the Unity3D game engine from command line.'.freeze
26
26
  UNITY_VERSIONS_NOTE = "Unity3d uses the following version formatting: 0.0.0x0. The \'x\' can takes different values:\n"\
27
27
  "\t. 'f' are the main release candidates for Unity3d\n"\
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: u3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerome Lacoste
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-11-03 00:00:00.000000000 Z
12
+ date: 2017-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander
@@ -269,9 +269,14 @@ files:
269
269
  - LOG_RULES.md
270
270
  - README.md
271
271
  - Rakefile
272
- - TODO.md
273
272
  - build.sh
274
273
  - config/log_rules.json
274
+ - docs/assets/ci_jenkins_ansi.png
275
+ - docs/assets/ci_jenkins_credentials.png
276
+ - docs/assets/ci_jenkins_rvm.png
277
+ - docs/assets/ci_jenkins_secret_passwords.png
278
+ - docs/assets/ci_jenkins_version_node.png
279
+ - docs/assets/ci_jenkins_version_param.png
275
280
  - docs/assets/u3d_available.png
276
281
  - docs/assets/u3d_install.png
277
282
  - docs/assets/u3d_list.png
@@ -279,6 +284,7 @@ files:
279
284
  - docs/assets/u3d_run_current.png
280
285
  - docs/assets/u3d_sanitize.png
281
286
  - docs/assets/u3d_uninstall.png
287
+ - docs/ci_setup.md
282
288
  - examples/Example1/.gitignore
283
289
  - examples/Example1/Assets/Editor.meta
284
290
  - examples/Example1/Assets/Editor/EditorRun.cs
data/TODO.md DELETED
@@ -1,11 +0,0 @@
1
- = before release
2
- * core: moar tests if needed
3
- * [JL] prepare documentation / README / site
4
-
5
- = post
6
- * patch commander to support argument descriptions
7
-
8
- * u3d specific keychain (u3d_credentials_store)
9
-
10
- * if failure to download a package, display available ones
11
- #No package "Mac" was found for version 5.6.0f3