Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Commit

Permalink
Updated gnscharts.sh script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Rupérez committed May 23, 2017
1 parent d06a455 commit 553dabe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ script:
build test
after_success:
- bash <(curl -s https://codecov.io/bash) -J 'Major'
- sh Scripts/gnscharts.sh Kommander-iOS IG27 none Testing
- sh Scripts/gnscharts.sh Kommander Major IG27 none Testing
6 changes: 3 additions & 3 deletions Scripts/gnscharts.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/sh
set -eu

# Usage: sh Scripts/gnscharts.sh TARGET_NAME PROJECT_CODE HONESTCODE_BLUEPRINT_NAME STAGE
APP_BINARY="$(find ~/Library/Developer/Xcode/DerivedData/$1*/Build/Intermediates/CodeCoverage/Products/*/$1.app/$1)"
# Usage: sh Scripts/gnscharts.sh PROJECT_NAME TARGET_NAME PROJECT_CODE HONESTCODE_BLUEPRINT_NAME STAGE
APP_BINARY="$(find ~/Library/Developer/Xcode/DerivedData/$1*/Build/Intermediates/CodeCoverage/Products/*/$2.app/$2)"
COVERAGE_PROFDATA="$(find ~/Library/Developer/Xcode/DerivedData/$1*/Build/Intermediates/CodeCoverage/Coverage.profdata)"
COVERAGE_PERCENT="$(xcrun llvm-cov report -instr-profile $COVERAGE_PROFDATA $APP_BINARY | awk '/TOTAL/ {print $4}' | tr . ,)"
echo Coverage - $COVERAGE_PERCENT -
LINES_OF_CODE="$(find . \( -path ./Pods -prune -o -path ./fastlane -prune -o -path ./\*Tests\* -prune \) -o \( -iname \*.swift -o -iname \*.m \) -print0 | xargs -0 wc -l | awk '{print $1}' | tail -1)"
echo Lines - $LINES_OF_CODE -
curl --user "${GNSUSER}" "https://devops.intelygenz.com/rest/projectState.aspx?projectCode=$2&cdPiece=ios&atddBlueprintName=$3cdStageName=$4&cdStageStatus=1&codeLinesOfCode=$LINES_OF_CODE&codeUTCover=${COVERAGE_PERCENT%%%}" > /dev/null
curl --user "${GNSUSER}" "https://devops.intelygenz.com/rest/projectState.aspx?projectCode=$3&cdPiece=ios&atddBlueprintName=$4cdStageName=$5&cdStageStatus=1&codeLinesOfCode=$LINES_OF_CODE&codeUTCover=${COVERAGE_PERCENT%%%}" > /dev/null

0 comments on commit 553dabe

Please sign in to comment.