Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #378 from codecov/package-name
Browse files Browse the repository at this point in the history
Add -Q argument to specify package name
  • Loading branch information
thomasrockhu authored Nov 16, 2020
2 parents 1ed543b + 018d461 commit eea08d9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SHA1SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ab0faeadb563e82c74d56e2fd5a4932bc8e7decb codecov
25046f4ad49332b13373c9cd743df89da79ea007 codecov
2 changes: 1 addition & 1 deletion SHA256SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c4835e9ba3b37fa8aacbabbea8be3c57291d6cf908e753dd5a44f2f53500681f codecov
fea4688d635341e3948f46444cfa65ae6c361abedd8faa57907a30cf63a36195 codecov
2 changes: 1 addition & 1 deletion SHA512SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
549bcc09a0eac9942d31de62c6756d5d1027fd3fde3977032d75190e9c2009ddb7fa2d0ed05128e694c19d0b581280ef819dbd7ba3830a7ee5f7db47fb6703f9 codecov
ac06301d51e5ef8d42c9bfcee3412e1819695d7de0555056ed088617d7e04c08e9756a4a16fd209b4b23254a5b27b9162f028dace617d6cc7c869f494180f7c5 codecov
13 changes: 9 additions & 4 deletions codecov
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
;;
Expand Down Expand Up @@ -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" != "" ];
Expand All @@ -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
Expand Down

0 comments on commit eea08d9

Please sign in to comment.