From 0c90fb420b068f6acf3e1558feaefe288308db05 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Tue, 26 Dec 2023 13:18:46 -0300 Subject: [PATCH] build: fix generate workflow Signed-off-by: Carlos Alexandro Becker --- .github/workflows/generate.yml | 1 + scripts/fury-upload.sh | 2 +- scripts/get-releases.sh | 4 ++-- scripts/pages/build.sh | 2 +- scripts/pre-commit.sh | 2 +- scripts/test.sh | 4 ++-- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 1cc35ac47..33bd340fb 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -23,6 +23,7 @@ jobs: with: version: 3.x repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: "go install mvdan.cc/gofumpt@latest" - run: task docs:releases env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/fury-upload.sh b/scripts/fury-upload.sh index 779bda4df..2ddc46e24 100755 --- a/scripts/fury-upload.sh +++ b/scripts/fury-upload.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e if [ "${1: -4}" == ".deb" ] || [ "${1: -4}" == ".rpm" ]; then cd dist diff --git a/scripts/get-releases.sh b/scripts/get-releases.sh index 029b9ea72..ff7b7c834 100755 --- a/scripts/get-releases.sh +++ b/scripts/get-releases.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail get_last_page() { @@ -21,7 +21,7 @@ generate() { curl \ -H "Authorization: Bearer $GITHUB_TOKEN" \ -sSf "$url?page=$page" | - jq 'map({tag_name: .tag_name})' >"$tmp/$i.json" + jq 'map({tag_name: .tag_name})' >"$tmp/$i.json" done jq -s 'add' "$tmp"/*.json >"$file" diff --git a/scripts/pages/build.sh b/scripts/pages/build.sh index 7daaf0e58..4b4182a0e 100755 --- a/scripts/pages/build.sh +++ b/scripts/pages/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail # unshallow (needed for the rss plugin) diff --git a/scripts/pre-commit.sh b/scripts/pre-commit.sh index 2c617023f..1138f7610 100755 --- a/scripts/pre-commit.sh +++ b/scripts/pre-commit.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES=$(git diff --cached --name-only --diff-filter=ACMR) gofumpt -l -w . diff --git a/scripts/test.sh b/scripts/test.sh index f15cea03c..2263fb52a 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,9 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash set -o pipefail && TEST_OPTIONS="-json" task test | tee output.json | tparse -follow success=$? set -e -NO_COLOR=1 tparse -format markdown -slow 10 -file output.json > $GITHUB_STEP_SUMMARY +NO_COLOR=1 tparse -format markdown -slow 10 -file output.json >$GITHUB_STEP_SUMMARY exit $success