From 489583490fbda224d5b30becf15a0274b83c06d4 Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Mon, 11 Nov 2024 07:41:41 +0100 Subject: [PATCH] Makefile,github-actions: use gh instead of curl Signed-off-by: Attila Szakacs --- .github/workflows/release.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf3fee1..b38d742 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -98,7 +98,7 @@ jobs: TITLE="${VERSION}" TAG="${VERSION}" TARBALL="dist/axosyslog_cfg_helper-${VERSION}.tar.gz" - LATEST_VERSION=$(curl -s https://api.github.com/repos/${{ github.repository_owner }}/axosyslog-cfg-helper/releases/latest | jq -r .tag_name) + LATEST_VERSION=$(gh api repos/${{ github.repository_owner }}/axosyslog-cfg-helper/releases/latest | jq -r .tag_name) echo "Generated for [AxoSyslog $(make print-axosyslog-version)]($(make print-axosyslog-release-url))." > description.md echo -n "## [${LATEST_VERSION}](https://github.com/alltilla/axosyslog-cfg-helper/releases/tag/${LATEST_VERSION})" >> description.md diff --git a/Makefile b/Makefile index 8606eb0..1632c3c 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ diff: @mkdir -p $(WORKING_DIR) rm -rf $(WORKING_DIR)/axosyslog-cfg-helper-latest $(WORKING_DIR)/axosyslog-cfg-helper-latest.tar.gz wget -q \ - $(shell curl -s https://api.github.com/repos/alltilla/axosyslog-cfg-helper/releases/latest | jq -r '.assets[] | select(.name | contains ("tar.gz")) | .browser_download_url') \ + $(shell gh api repos/alltilla/axosyslog-cfg-helper/releases/latest | jq -r '.assets[] | select(.name | contains ("tar.gz")) | .browser_download_url') \ -O $(WORKING_DIR)/axosyslog-cfg-helper-latest.tar.gz mkdir -p $(WORKING_DIR)/axosyslog-cfg-helper-latest tar -xz \