diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2018-12-06 10:22:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 10:22:37 +0100 |
commit | 16929d4172138b8ea016845b24e41897775149c0 (patch) | |
tree | 51e9f5c71ba5773f27da25857f09335eb982fd18 | |
parent | 972e4033b54d84e20a860baa9e51cfc144d2c476 (diff) |
run shfmt on CI scripts (#4928)
[netdata release candidate]
-rwxr-xr-x | .travis/create_artifacts.sh | 17 | ||||
-rwxr-xr-x | .travis/generate_changelog.sh | 21 | ||||
-rwxr-xr-x | .travis/tagger.sh | 9 |
3 files changed, 23 insertions, 24 deletions
diff --git a/.travis/create_artifacts.sh b/.travis/create_artifacts.sh index 40ba9c85f7..28f44f280a 100755 --- a/.travis/create_artifacts.sh +++ b/.travis/create_artifacts.sh @@ -1,10 +1,9 @@ #!/bin/bash # shellcheck disable=SC2230 -if [ ! -f .gitignore ] -then - echo "Run as ./travis/$(basename "$0") from top level directory of git repository" - exit 1 +if [ ! -f .gitignore ]; then + echo "Run as ./travis/$(basename "$0") from top level directory of git repository" + exit 1 fi # Make sure stdout is in blocking mode. If we don't, then conda create will barf during downloads. @@ -20,14 +19,12 @@ echo "--- Create self-extractor ---" echo "--- Create checksums ---" GIT_TAG=$(git tag --points-at) if [ "${GIT_TAG}" != "" ]; then - ln -s netdata-latest.gz.run "netdata-${GIT_TAG}.gz.run" - ln -s netdata-*.tar.gz "netdata-${GIT_TAG}.tar.gz" - sha256sum -b "netdata-${GIT_TAG}.gz.run" "netdata-${GIT_TAG}.tar.gz" > "sha256sums.txt" + ln -s netdata-latest.gz.run "netdata-${GIT_TAG}.gz.run" + ln -s netdata-*.tar.gz "netdata-${GIT_TAG}.tar.gz" + sha256sum -b "netdata-${GIT_TAG}.gz.run" "netdata-${GIT_TAG}.tar.gz" >"sha256sums.txt" else - sha256sum -b ./*.tar.gz ./*.gz.run > "sha256sums.txt" + sha256sum -b ./*.tar.gz ./*.gz.run >"sha256sums.txt" fi echo "checksums:" cat sha256sums.txt - - diff --git a/.travis/generate_changelog.sh b/.travis/generate_changelog.sh index e3314156f7..ca9040e464 100755 --- a/.travis/generate_changelog.sh +++ b/.travis/generate_changelog.sh @@ -2,10 +2,9 @@ set -e -if [ ! -f .gitignore ] -then - echo "Run as ./travis/$(basename "$0") from top level directory of git repository" - exit 1 +if [ ! -f .gitignore ]; then + echo "Run as ./travis/$(basename "$0") from top level directory of git repository" + exit 1 fi COMMIT_AND_PUSH=${COMMIT_AND_PUSH:-0} @@ -29,13 +28,13 @@ git checkout master git pull #docker run -it --rm -v "$(pwd)":/usr/local/src/your-app ferrarimarco/github-changelog-generator:1.14.3 \ docker run -it -v "$(pwd)":/project markmandel/github-changelog-generator:latest \ - --user "${ORGANIZATION}" \ - --project "${PROJECT}" \ - --token "${GITHUB_TOKEN}" \ - --since-tag "v1.10.0" \ - --unreleased-label "**Next release**" \ - --exclude-labels "stale,duplicate,question,invalid,wontfix,discussion,no changelog" \ - --no-compare-link ${OPTS} + --user "${ORGANIZATION}" \ + --project "${PROJECT}" \ + --token "${GITHUB_TOKEN}" \ + --since-tag "v1.10.0" \ + --unreleased-label "**Next release**" \ + --exclude-labels "stale,duplicate,question,invalid,wontfix,discussion,no changelog" \ + --no-compare-link ${OPTS} echo "--- Uploading changelog ---" git add CHANGELOG.md diff --git a/.travis/tagger.sh b/.travis/tagger.sh index 80e86d7afe..59e75348fb 100755 --- a/.travis/tagger.sh +++ b/.travis/tagger.sh @@ -24,7 +24,7 @@ fi # Embed new version in files which need it. # This wouldn't be needed if we could use `git tag` everywhere. -function embed_version { +function embed_version() { VERSION="$1" MAJOR=$(echo "$GIT_TAG" | cut -d . -f 1 | cut -d v -f 2) MINOR=$(echo "$GIT_TAG" | cut -d . -f 2) @@ -37,7 +37,7 @@ function embed_version { # Figure out what will be new release candidate tag based only on previous ones. # This assumes that RELEASES are in format of "v0.1.2" and prereleases (RCs) are using "v0.1.2-rc0" -function release_candidate { +function release_candidate() { LAST_TAG=$(git semver) if [[ $LAST_TAG =~ -rc* ]]; then VERSION=$(echo "$LAST_TAG" | cut -d'-' -f 1) @@ -62,7 +62,10 @@ if [ -z "${GIT_TAG}" ]; then *"[netdata minor release]"*) GIT_TAG="v$(git semver --next-minor)" ;; *"[netdata major release]"*) GIT_TAG="v$(git semver --next-major)" ;; *"[netdata release candidate]"*) release_candidate ;; - *) echo "Keyword not detected. Exiting..."; exit 0;; + *) + echo "Keyword not detected. Exiting..." + exit 0 + ;; esac fi embed_version "$GIT_TAG" |