Browse Source

build: put depot_tools first on windows

Samuel Attard 5 years ago
parent
commit
52998c6b61
1 changed files with 13 additions and 2 deletions
  1. 13 2
      .circleci/config.yml

+ 13 - 2
.circleci/config.yml

@@ -205,7 +205,12 @@ step-depot-tools-get: &step-depot-tools-get
 step-depot-tools-add-to-path: &step-depot-tools-add-to-path
   run:
     name: Add depot tools to PATH
-    command: echo 'export PATH="$PATH:'"$PWD"'/depot_tools"' >> $BASH_ENV
+    command: |
+      if [ "`uname|cut -c 1-7`" == "MSYS_NT" ]; then
+        echo 'export PATH="'"$PWD"'/depot_tools:$PATH"' >> $BASH_ENV
+      else
+        echo 'export PATH="$PATH:'"$PWD"'/depot_tools"' >> $BASH_ENV
+      fi
 
 step-gclient-sync: &step-gclient-sync
   run:
@@ -743,7 +748,13 @@ step-save-out-cache: &step-save-out-cache
 step-run-electron-only-hooks: &step-run-electron-only-hooks
   run:
     name: Run Electron Only Hooks
-    command: gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
+    command: |
+      # On windows we have to run gclient through cmd.exe
+      if [ "`uname|cut -c 1-7`" == "MSYS_NT" ]; then
+        cmd.exe /c "gclient runhooks --spec=\"solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]\""
+      else
+        gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
+      fi
 
 step-generate-deps-hash-cleanly: &step-generate-deps-hash-cleanly
   run: