From 018d461aec8d7f2b036caf1a6554122f817429b5 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Sun, 15 Nov 2020 23:01:44 -0500 Subject: [PATCH] Add -Q argument to specify package name --- SHA1SUM | 2 +- SHA256SUM | 2 +- SHA512SUM | 2 +- codecov | 13 +++++++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/SHA1SUM b/SHA1SUM index 0226a5e2..4a435a1d 100644 --- a/SHA1SUM +++ b/SHA1SUM @@ -1 +1 @@ -ab0faeadb563e82c74d56e2fd5a4932bc8e7decb codecov +25046f4ad49332b13373c9cd743df89da79ea007 codecov diff --git a/SHA256SUM b/SHA256SUM index 3c21a1ea..b6c8537c 100644 --- a/SHA256SUM +++ b/SHA256SUM @@ -1 +1 @@ -c4835e9ba3b37fa8aacbabbea8be3c57291d6cf908e753dd5a44f2f53500681f codecov +fea4688d635341e3948f46444cfa65ae6c361abedd8faa57907a30cf63a36195 codecov diff --git a/SHA512SUM b/SHA512SUM index 2e23241a..04f633bd 100644 --- a/SHA512SUM +++ b/SHA512SUM @@ -1 +1 @@ -549bcc09a0eac9942d31de62c6756d5d1027fd3fde3977032d75190e9c2009ddb7fa2d0ed05128e694c19d0b581280ef819dbd7ba3830a7ee5f7db47fb6703f9 codecov +ac06301d51e5ef8d42c9bfcee3412e1819695d7de0555056ed088617d7e04c08e9756a4a16fd209b4b23254a5b27b9162f028dace617d6cc7c869f494180f7c5 codecov diff --git a/codecov b/codecov index c8e2ea5c..18f19fb4 100755 --- a/codecov +++ b/codecov @@ -62,6 +62,7 @@ branch_o="" slug_o="" prefix_o="" git_ls_files_recurse_submodules_o="" +package="bash" commit="$VCS_COMMIT_ID" branch="$VCS_BRANCH_NAME" @@ -251,7 +252,7 @@ parse_yaml() { if [ $# != 0 ]; then - while getopts "a:A:b:B:cC:dD:e:f:F:g:G:hJ:k:Kn:p:P:q:r:R:s:S:t:T:u:U:vx:X:ZN:" o + while getopts "a:A:b:B:cC:dD:e:f:F:g:G:hJ:k:Kn:p:P:Q:q:r:R:s:S:t:T:u:U:vx:X:ZN:" o do codecov_flags+=( "$o" ) case "$o" in @@ -352,6 +353,10 @@ $OPTARG" "P") pr_o="$OPTARG" ;; + "Q") + # this is only meant for Codecov packages to overwrite + package="$OPTARG" + ;; "q") save_to="$OPTARG" ;; @@ -1650,7 +1655,7 @@ if [ "$dump" != "0" ]; then # trim whitespace from query say " ${e}->${x} Dumping upload file (no upload)" - echo "$url/upload/v4?$(echo "package=bash-$VERSION&token=$token&$query" | tr -d ' ')" + echo "$url/upload/v4?$(echo "package=$package-$VERSION&token=$token&$query" | tr -d ' ')" cat "$upload_file" else if [ "$save_to" != "" ]; @@ -1668,9 +1673,9 @@ else say " ${e}query:${x} $query" # Full query without token (to display on terminal output) - queryNoToken=$(echo "package=bash-$VERSION&token=secret&$query" | tr -d ' ') + queryNoToken=$(echo "package=$package-$VERSION&token=secret&$query" | tr -d ' ') # now add token to query - query=$(echo "package=bash-$VERSION&token=$token&$query" | tr -d ' ') + query=$(echo "package=$package-$VERSION&token=$token&$query" | tr -d ' ') if [ "$ft_s3" = "1" ]; then