@leverege/build-tools 2.0.11 → 2.0.12

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "A package for development build tools.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -66,8 +66,13 @@ if [ "$CIRCLECI" == "true" ]; then
66
66
  initialize_gcloud
67
67
  fi
68
68
 
69
- # Attempt to grab org name from git remote origin
70
- git_orgname=`git config --get remote.origin.url | cut -d ":" -f 2 | cut -d "/" -f 1`
69
+ git_origin=`git config --get remote.origin.url`
70
+
71
+ if [[ $git_origin = https* ]]; then
72
+ git_orgname=`echo $git_origin | cut -d "@" -f 2 | cut -d "/" -f 2`
73
+ else
74
+ git_orgname=`echo $git_origin | cut -d ":" -f 2 | cut -d "/" -f 1`
75
+ fi
71
76
 
72
77
  # Set project based on org name
73
78
  printf "\nDetecting organization name...\n"
@@ -10,7 +10,13 @@ if [ "$1" == "-h" ]; then
10
10
  fi
11
11
 
12
12
  # Attempt to grab org name from git remote origin
13
- git_orgname=`git config --get remote.origin.url | cut -d ":" -f 2 | cut -d "/" -f 1`
13
+ git_origin=`git config --get remote.origin.url`
14
+
15
+ if [[ $git_origin = https* ]]; then
16
+ git_orgname=`echo $git_origin | cut -d "@" -f 2 | cut -d "/" -f 2`
17
+ else
18
+ git_orgname=`echo $git_origin | cut -d ":" -f 2 | cut -d "/" -f 1`
19
+ fi
14
20
 
15
21
  # Set project based on org name
16
22
  printf "\nDetecting organization name...\n"