diff --git a/.circleci/config.yml b/.circleci/config.yml index b939e9c..d2f0bcf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,10 +11,25 @@ workflows: lint-pack: jobs: - orb-tools/lint: + pre-steps: + - checkout + - run: git submodule init + - run: git submodule update --remote + checkout: false filters: *filters - orb-tools/pack: + pre-steps: + - checkout + - run: git submodule init + - run: git submodule update --remote + checkout: false filters: *filters - orb-tools/review: + pre-steps: + - checkout + - run: git submodule init + - run: git submodule update --remote + checkout: false filters: *filters # release dev version of orb, for testing & possible publishing. diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 4032726..6bab4e9 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: codecov: codecov/codecov@dev:alpha node: circleci/node@5 - orb-tools: circleci/orb-tools@11 + orb-tools: circleci/orb-tools@12 python: circleci/python@2 win: circleci/windows@4 @@ -165,18 +165,23 @@ workflows: requires: [test-backend, test-frontend] - orb-tools/pack: + pre-steps: + - checkout + - run: git submodule init + - run: git submodule update --remote + checkout: false filters: *filters requires: [test-linux, test-macos, test-windows] - orb-tools/publish: - enable-pr-comment: false + enable_pr_comment: false filters: branches: ignore: /.*/ tags: only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ - orb-name: codecov/codecov - pub-type: production + orb_name: codecov/codecov + pub_type: production requires: - orb-tools/pack - vcs-type: github + vcs_type: github diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d2fd8e1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "src/scripts"] + path = src/scripts + url = https://github.com/codecov/wrapper + branch = main diff --git a/src/scripts b/src/scripts new file mode 160000 index 0000000..9b7ac3d --- /dev/null +++ b/src/scripts @@ -0,0 +1 @@ +Subproject commit 9b7ac3d9f1fd6e7ab391e71026a7a2d29970ed4c diff --git a/src/scripts/download.sh b/src/scripts/download.sh deleted file mode 100644 index 2895d16..0000000 --- a/src/scripts/download.sh +++ /dev/null @@ -1,22 +0,0 @@ -family=$(uname -s | tr '[:upper:]' '[:lower:]') -codecov_os="windows" -[[ $family == "darwin" ]] && codecov_os="macos" - -[[ $family == "linux" ]] && codecov_os="linux" -[[ $codecov_os == "linux" ]] && \ - osID=$(grep -e "^ID=" /etc/os-release | cut -c4-) -[[ $osID == "alpine" ]] && codecov_os="alpine" -echo "Detected ${codecov_os}" -echo "export codecov_os=${codecov_os}" >> $BASH_ENV -echo "export codecov_version=${PARAM_VERSION}" >> $BASH_ENV - -codecov_filename="codecov" -[[ $codecov_os == "windows" ]] && codecov_filename+=".exe" -echo "export codecov_filename=${codecov_filename}" >> $BASH_ENV -[[ $codecov_os == "macos" ]] && \ - HOMEBREW_NO_AUTO_UPDATE=1 brew install gpg -codecov_url="https://cli.codecov.io" -codecov_url="$codecov_url/${PARAM_VERSION}" -codecov_url="$codecov_url/${codecov_os}/${codecov_filename}" -echo "Downloading ${codecov_url}" -curl -Os $codecov_url -v diff --git a/src/scripts/pgp_keys.asc b/src/scripts/pgp_keys.asc deleted file mode 100644 index b7dfce0..0000000 --- a/src/scripts/pgp_keys.asc +++ /dev/null @@ -1,52 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBGCsMn0BEACiCKZOhkbhUjb+obvhH49p3ShjJzU5b/GqAXSDhRhdXUq7ZoGq -KEKCd7sQHrCf16Pi5UVacGIyE9hS93HwY15kMlLwM+lNeAeCglEscOjpCly1qUIr -sN1wjkd2cwDXS6zHBJTqJ7wSOiXbZfTAeKhd6DuLEpmA+Rz4Yc+4qZP+fVxVG3Pv -2v06m+E5CP/JQVQPO8HYi+S36hJImTh+zaDspu+VujSai5KzJ6YKmgwslVNIp5X5 -GnEr2uAh5w6UTnt9UQUjFFliAvQ3lPLWzm7DWs6AP9hslYxSWzwbzVF5qbOIjUJL -KfoUpvCYDs2ObgRn8WUQO0ndkRCBIxhlF3HGGYWKQaCEsiom7lyi8VbAszmUCDj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uyE5RT2emBDiWvSR6hQQ8bZ -WFNXal+bUPpaRiruCCUPD2b8Od1ftzLqbYOosxr/m5Du0uahgOuGw6zlGBJCVOo7 -UB2Y++oZ8P7oDGF722opepWQ+bl2a6TRMLNWWlj4UANknyjlhyZZ7PKhWLjoC6MU -dAKcwQUdp+XYLc/3b00bvgju0e99QgHZMX2fN3d3ktdN5Q2fqiAi5R6BmCCO4ISF -o5j10gGU/sdqGHvNhv5C21ibun7HEzMtxBhnhGmytfBJzrsj7GOReePsfTLoCoUq -dFMOAVUDciVfRtL2m8cv42ZJOXtPfDjsFOf8AKJk40/tc8mMMqZP7RVBr9RWOoq5 -y9D37NfI6UB8rPZ6qs0a1Vfm8lIh2/k1AFECduXgftMDTsmmXOgXXS37HukGW7AL -QKWiWJQF/XopkXwkyAYpyuyRMZ77oF7nuqLFnl5VVEiRo0Fwu45erebc6ccSwYZU -8pmeSx7s0aJtxCZPSZEKZ3mn0BXOR32Cgs48CjzFWf6PKucTwOy/YO0/4Gt/upNJ -3DyeINcYcKyD08DEIF9f5tLyoiD4xz+N23ltTBoMPyv4f3X/wCQ= -=ch7z ------END PGP PUBLIC KEY BLOCK----- diff --git a/src/scripts/upload.sh b/src/scripts/upload.sh deleted file mode 100755 index f3d3b0e..0000000 --- a/src/scripts/upload.sh +++ /dev/null @@ -1,66 +0,0 @@ -unset NODE_OPTIONS -# See https://github.com/codecov/uploader/issues/475 -source $BASH_ENV - -chmod +x $codecov_filename -[ -n "${PARAM_FILE}" ] && \ - set - "${@}" "-f" "${PARAM_FILE}" -[ -n "${PARAM_UPLOAD_ARGS}" ] && \ - set - "${@}" "${PARAM_UPLOAD_ARGS}" - -if [ -z "${PARAM_UPLOAD_NAME}" ]; then - PARAM_UPLOAD_NAME="${CIRCLE_BUILD_NUM}" -fi - -FLAGS="" -OLDIFS=$IFS;IFS=, -for flag in $PARAM_FLAGS; do - eval e="\$$flag" - for param in "${e}" "${flag}"; do - if [ -n "${param}" ]; then - if [ -n "${FLAGS}" ]; then - FLAGS="${FLAGS},${param}" - else - FLAGS="${param}" - fi - break - fi - done -done -IFS=$OLDIFS - -if [ -n "$FLAGS" ]; then - FLAGS="-F ${FLAGS}" -fi - -#create commit -echo "./\"$codecov_filename\" ${PARAM_CLI_ARGS} create-commit -t " - -./"$codecov_filename" \ - ${PARAM_CLI_ARGS} \ - create-commit \ - -t "$(eval echo \$$PARAM_TOKEN)" \ - ${PARAM_COMMIT_ARGS} - -#create report -echo "./\"$codecov_filename\" ${PARAM_CLI_ARGS} create-report -t " - -./"$codecov_filename" \ - ${PARAM_CLI_ARGS} \ - create-report \ - -t "$(eval echo \$$PARAM_TOKEN)" \ - ${PARAM_REPORT_ARGS} - -#upload reports -# alpine doesn't allow for indirect expansion - -echo "./${codecov_filename} ${PARAM_CLI_ARGS} do-upload -t -n \"${PARAM_UPLOAD_NAME}\" ${FLAGS} ${PARAM_UPLOAD_ARGS} ${@}" - -./"$codecov_filename" \ - ${PARAM_CLI_ARGS} \ - do-upload \ - -t "$(eval echo \$$PARAM_TOKEN)" \ - -n "${PARAM_UPLOAD_NAME}" \ - ${FLAGS} \ - ${PARAM_UPLOAD_ARGS} \ - ${@} diff --git a/src/scripts/validate.sh b/src/scripts/validate.sh deleted file mode 100644 index 12db7a7..0000000 --- a/src/scripts/validate.sh +++ /dev/null @@ -1,13 +0,0 @@ -source "$BASH_ENV" -echo "${CODECOV_PUBLIC_PGP_KEY}" | \ - gpg --no-default-keyring --keyring trustedkeys.kbx --import -# One-time step -sha_url="https://cli.codecov.io" -sha_url="${sha_url}/${codecov_version}/${codecov_os}" -sha_url="${sha_url}/${codecov_filename}.SHA256SUM" -echo "Downloading ${sha_url}" -curl -Os "$sha_url" -curl -Os "${sha_url}.sig" -gpgv "${codecov_filename}.SHA256SUM.sig" "${codecov_filename}.SHA256SUM" -shasum -a 256 -c "${codecov_filename}.SHA256SUM" || \ - sha256sum -c "${codecov_filename}.SHA256SUM"