瀏覽代碼

Replave 'getBranchName.sh' with Git command

Signed-off-by: Tim Krüger <t@timkrueger.me>
Tim Krüger 2 年之前
父節點
當前提交
c8c3500be9
共有 2 個文件被更改,包括 1 次插入10 次删除
  1. 1 1
      .drone.yml
  2. 0 9
      scripts/analysis/getBranchName.sh

+ 1 - 1
.drone.yml

@@ -91,7 +91,7 @@ steps:
       LOG_PASSWORD:
         from_secret: LOG_PASSWORD
     commands:
-      - export BRANCH=$(scripts/analysis/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
+      - export BRANCH=$(git branch | grep '*' | cut -d' ' -f2)
       - scripts/analysis/analysis-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST
 
   - name: notify

+ 0 - 9
scripts/analysis/getBranchName.sh

@@ -1,9 +0,0 @@
-#!/bin/bash
-
-# $1: username, $2: password/token, $3: pull request number
-
-if [ -z $3 ] ; then
-    echo "master";
-else
-    curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/talk-android/pulls/$3 | grep \"ref\": | grep -v master | cut -d"\"" -f4
-fi