|
17 | 17 |
|
18 | 18 |
|
19 | 19 | class Tns(object):
|
| 20 | + # npm tag used when we publish master branch of https://github.com/NativeScript/NativeScript |
| 21 | + # Please see https://github.com/NativeScript/NativeScript/blob/master/.travis.yml |
| 22 | + NEXT_TAG = 'internal-preview' |
| 23 | + |
20 | 24 | @staticmethod
|
21 | 25 | def __get_platform_string(platform=Platforms.NONE):
|
22 | 26 | if platform is Platforms.NONE:
|
@@ -107,7 +111,7 @@ def update_modules(path, tns_path=None):
|
107 | 111 | # In master branch we use @next packages.
|
108 | 112 | else:
|
109 | 113 | Tns.plugin_remove("tns-core-modules", attributes={"--path": path}, assert_success=False, tns_path=tns_path)
|
110 |
| - output = Tns.plugin_add("tns-core-modules@next", attributes={"--path": path}, tns_path=tns_path) |
| 114 | + output = Tns.plugin_add("tns-core-modules@" + Tns.NEXT_TAG, attributes={"--path": path}, tns_path=tns_path) |
111 | 115 | assert "undefined" not in output, "Something went wrong when modules are installed."
|
112 | 116 | assert "ERR" not in output, "Something went wrong when modules are installed."
|
113 | 117 | return output
|
@@ -259,15 +263,15 @@ def plugin_add(name, attributes={}, log_trace=False, assert_success=True, tns_pa
|
259 | 263 | output = Tns.run_tns_command("plugin add " + name, attributes=attributes, log_trace=log_trace,
|
260 | 264 | tns_path=tns_path)
|
261 | 265 | if assert_success:
|
262 |
| - assert "Successfully installed plugin {0}".format(name.replace("@next", "")) in output |
| 266 | + assert "Successfully installed plugin {0}".format(name.replace("@" + Tns.NEXT_TAG, "")) in output |
263 | 267 | return output
|
264 | 268 |
|
265 | 269 | @staticmethod
|
266 | 270 | def plugin_remove(name, attributes={}, log_trace=False, assert_success=True, tns_path=None):
|
267 | 271 | output = Tns.run_tns_command("plugin remove " + name, attributes=attributes, log_trace=log_trace,
|
268 | 272 | tns_path=tns_path)
|
269 | 273 | if assert_success:
|
270 |
| - assert "Successfully removed plugin {0}".format(name.replace("@next", "")) in output |
| 274 | + assert "Successfully removed plugin {0}".format(name.replace("@" + Tns.NEXT_TAG, "")) in output |
271 | 275 | return output
|
272 | 276 |
|
273 | 277 | @staticmethod
|
|
0 commit comments