diff --git a/compare.sh b/compare.sh deleted file mode 100755 index fc8cd8bf..00000000 --- a/compare.sh +++ /dev/null @@ -1,13 +0,0 @@ -GREEN='\033[0;32m' -NC='\033[0m' - -echo "${GREEN}---Old---${NC}" -yq $@ > /tmp/yq-old-output -cat /tmp/yq-old-output - -echo "${GREEN}---New---${NC}" -./yq $@ > /tmp/yq-new-output -cat /tmp/yq-new-output - -echo "${GREEN}---Diff---${NC}" -colordiff /tmp/yq-old-output /tmp/yq-new-output \ No newline at end of file diff --git a/release_instructions.txt b/release_instructions.txt index 8756ca9b..14080e8f 100644 --- a/release_instructions.txt +++ b/release_instructions.txt @@ -8,7 +8,8 @@ - make local xcompile (builds binaries for all platforms) - git release - ./scripts/publish.sh + ./scripts/release.sh + ./scripts/upload.sh - snapcraft - will auto create a candidate, test it works then promote diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 00000000..c169aa2d --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -ex +GITHUB_TOKEN="${GITHUB_TOKEN:?missing required input \'GITHUB_TOKEN\'}" + +CURRENT="$(git describe --tags --abbrev=0)" +PREVIOUS="$(git describe --tags --abbrev=0 --always "${CURRENT}"^)" +OWNER="mikefarah" +REPO="yq" + +release() { + github-release release \ + --user "$OWNER" \ + --draft \ + --repo "$REPO" \ + --tag "$CURRENT" +} + + + +release + diff --git a/scripts/publish.sh b/scripts/upload.sh similarity index 82% rename from scripts/publish.sh rename to scripts/upload.sh index 40b290f6..7498c2f4 100755 --- a/scripts/publish.sh +++ b/scripts/upload.sh @@ -7,14 +7,6 @@ PREVIOUS="$(git describe --tags --abbrev=0 --always "${CURRENT}"^)" OWNER="mikefarah" REPO="yq" -release() { - github-release release \ - --user "$OWNER" \ - --draft \ - --repo "$REPO" \ - --tag "$CURRENT" -} - upload() { mkdir -p ./build-done while IFS= read -r -d $'\0'; do @@ -32,5 +24,5 @@ upload() { done < <(find ./build -mindepth 1 -maxdepth 1 -print0) } -# release + upload diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 230d2ddc..53c3c9d3 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: yq -version: '3.4.0' +version: '4.0.0-alpha1' summary: A lightweight and portable command-line YAML processor description: | The aim of the project is to be the jq or sed of yaml files.