Skip to content

Commit 6ca9f38

Browse files
Use https for submodule initialization
At the moment the submodule is initialized via ssh. This way the command `git submodule update --init` will work only for users who have write access to mobile-cli-lib. This also requires custom logic when travis is used. In current implementation, travis automatically calls `npm install` before executing the scripts, but at this point the submodule is not initialized yet (as we have declared submodules variable to false). So the `npm install` executed by travis, will fail in case the postinstall script uses some code from the submodule. In order to fix this two changes are applied: - change the sumodule to be used over https instead of ssh. - modify .travis.yml to use submodule correctly and remove two manual steps which are executed by travis by default, there's no need the execute them again. NOTE: In case you have two-factor authentication, you'll not be able to commit to mobile-cli-lib over https. In this case you have to: - remove content of lib/common dir - clone over ssh: `$ git clone [email protected]:telerik/mobile-cli-lib.git .` (you must be inside lib/common dir).
1 parent 2addc27 commit 6ca9f38

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "lib/common"]
22
path = lib/common
3-
url = git@github.com:telerik/mobile-cli-lib.git
3+
url = https://github.com/telerik/mobile-cli-lib.git

.travis.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ language: node_js
77
node_js:
88
- '4'
99
git:
10-
submodules: false
10+
submodules: true
1111
before_script:
12-
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
13-
- git submodule update --init --recursive
1412
- npm install grunt
1513
- node_modules/.bin/grunt enableScripts:false
16-
- npm install
1714
- grunt rebuild
1815
- ./bin/nativescript error-reporting disable # force ~/.local dir creation -- some tests rely on it
1916
- ./bin/nativescript usage-reporting disable
@@ -44,5 +41,5 @@ deploy:
4441
4542
on:
4643
branch: master
47-
api_key:
44+
api_key:
4845
secure: Ugq6m/y4P5gF15zffYzTKhusn1Csu3ymYLdD+yXgyK3hek9Ms5PKTz4MKgPinlViRCBoQV2fGh0JsCikawIpmQyD+M+FRDKlP2GcXPhFmSN1wVEloxTCwe7H6m7Kl9mo+MJOTS0BN7waCc6yTJBJPxo5nwFgz+DT2srIYndA2h4=

0 commit comments

Comments
 (0)