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

Commit f181fd2

Browse files
authored
Remove version dependency on date and SHA (#422)
* Remove version dependency on date and SHA * Use VERSION for tbd in tests
1 parent b104bfe commit f181fd2

File tree

8 files changed

+14
-28
lines changed

8 files changed

+14
-28
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
gcloud --quiet config set project ${GCLOUD_PROJECT_ID}
4747
gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE}
4848
- run:
49-
name: Update uploader and env with versions
49+
name: Update and push release tag
5050
command: ./scripts/version.sh
5151
- run:
5252
name: Upload Bash Uploader

SHA1SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6d9842131391ad7e27631142c38dc74a9a680a3a codecov
1+
0ddc61a9408418c73b19a1375f63bb460dc947a8 codecov

SHA256SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bbfe23d850d80f1e522cc49251fb3c9c8e812531537782bd4a9c5f6a65ccf588 codecov
1+
89c658e261d5f25533598a222fd96cf17a5fa0eb3772f2defac754d9970b2ec8 codecov

SHA512SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0696019e73cf96c52cb3c9e1ec88cf3067eade4121a36b2e2bfc28b44d50dfa353f7e83a99b55be6a405d6f070035aa0e08ec7a50d5d221f1d4f49d76b344000 codecov
1+
d075b412a362a9a2b7aedfec3b8b9a9a927b3b99e98c7c15a2b76ef09862aeb005e91d76a5fd71b511141496d0fd23d1b42095f722ebcd509d768fba030f159e codecov

codecov

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
set -e +o pipefail
77

8-
VERSION="tbd"
8+
VERSION="1.0.1"
99

1010
codecov_flags=( )
1111
url="https://codecov.io"
@@ -124,7 +124,7 @@ cat << EOF
124124
125125
-e VAR,VAR2
126126
127-
-k prefix Prefix filepaths to help resolve path fixing
127+
-k prefix Prefix filepaths to help resolve path fixing
128128
129129
-i prefix Only include files in the network with a certain prefix. Useful for upload-specific path fixing
130130

env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
set -e +o pipefail
77

8-
VERSION="tbd"
8+
VERSION="1.0.1"
99

1010
add()
1111
{

scripts/version.sh

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22

33
set -x
44

5-
change_bash_file () {
6-
sed -i -e "s|.*VERSION=.*|VERSION=\"$RELEASE_TAG\"|g" codecov
7-
rm codecov-e || :
8-
}
9-
10-
change_env_file () {
11-
sed -i -e "s|.*VERSION=.*|VERSION=\"$RELEASE_TAG\"|g" env
12-
rm env-e || :
5+
clear_branch () {
6+
# Clear changes
7+
git stash
138
}
149

1510
update_branch () {
@@ -26,16 +21,7 @@ tag_and_push () {
2621
git push origin "$RELEASE_TAG"
2722
}
2823

29-
clear_branch () {
30-
# Clear changes
31-
git stash
32-
}
33-
3424
clear_branch
3525
update_branch
36-
short_git=$(git rev-parse --short HEAD)
37-
date=$(date +%Y%m%d)
38-
RELEASE_TAG="$date-$short_git"
39-
change_bash_file
40-
change_env_file
26+
RELEASE_TAG=$(grep 'VERSION=\".*\"' codecov | cut -d'"' -f2)
4127
tag_and_push

tests/test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ function test_buddy () {
643643
export BUDDY_EXECUTION_ID="1"
644644
export BUDDY_EXECUTION_PULL_REQUEST_NO="1"
645645
export BUDDY_REPO_SLUG="codecov/ci-repo"
646-
assertURL "https://codecov.io/upload/v4?package=bash-tbd&token=&branch=master&commit=$TEST_DATA_GIT_COMMIT&build=1&build_url=&name=&tag=&slug=codecov%2Fci-repo&service=buddy&flags=&pr=1&job=&cmd_args=d,C"
646+
assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=master&commit=$TEST_DATA_GIT_COMMIT&build=1&build_url=&name=&tag=&slug=codecov%2Fci-repo&service=buddy&flags=&pr=1&job=&cmd_args=d,C"
647647
}
648648

649649
function test_cirrus () {
@@ -656,7 +656,7 @@ function test_cirrus () {
656656
export CIRRUS_BUILD_ID="777"
657657
export CIRRUS_TASK_ID="239"
658658
export CIRRUS_TASK_NAME="test"
659-
assertURL "https://codecov.io/upload/v4?package=bash-tbd&token=&branch=$CIRRUS_BRANCH&commit=$TEST_DATA_GIT_COMMIT&build=$CIRRUS_BUILD_ID&build_url=https%3A%2F%2Fcirrus-ci.com%2Ftask%2F$CIRRUS_TASK_ID&name=&tag=&slug=codecov%2Fci-repo&service=cirrus-ci&flags=&pr=1&job=test&cmd_args=d,C"
659+
assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=$CIRRUS_BRANCH&commit=$TEST_DATA_GIT_COMMIT&build=$CIRRUS_BUILD_ID&build_url=https%3A%2F%2Fcirrus-ci.com%2Ftask%2F$CIRRUS_TASK_ID&name=&tag=&slug=codecov%2Fci-repo&service=cirrus-ci&flags=&pr=1&job=test&cmd_args=d,C"
660660
}
661661

662662
function test_heroku () {
@@ -665,7 +665,7 @@ function test_heroku () {
665665
export HEROKU_TEST_RUN_BRANCH="master"
666666
export HEROKU_TEST_RUN_ID="1"
667667
export HEROKU_TEST_RUN_COMMIT_VERSION="$TEST_DATA_GIT_COMMIT"
668-
assertURL "https://codecov.io/upload/v4?package=bash-tbd&token=&branch=master&commit=$TEST_DATA_GIT_COMMIT&build=1&build_url=&name=&tag=&slug=codecov%2Fcodecov-bash&service=heroku&flags=&pr=&job=&cmd_args=d,C"
668+
assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=master&commit=$TEST_DATA_GIT_COMMIT&build=1&build_url=&name=&tag=&slug=codecov%2Fcodecov-bash&service=heroku&flags=&pr=&job=&cmd_args=d,C"
669669
}
670670

671671
# Call and Run all Tests

0 commit comments

Comments
 (0)