summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared J2024-02-25 18:35:34 +1100
committerJared J2024-02-25 18:35:34 +1100
commit8a1f66b47e2e70f87dcbf636d0d29eb267444159 (patch)
treec4f1f76a416cf24011b98966e2f3ddf623dce908
parentb8189edca8dc50dbbbcd952c97337d81908adf36 (diff)
downloadaur-8a1f66b47e2e70f87dcbf636d0d29eb267444159.tar.gz
Revert recent commits. Change of plans.
-rwxr-xr-xautoUpdate45
1 files changed, 0 insertions, 45 deletions
diff --git a/autoUpdate b/autoUpdate
deleted file mode 100755
index 91f404b99ab8..000000000000
--- a/autoUpdate
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-# A script for automatically updating the kibana AUR package by checking the project's releases on github
-# Jared Johnstone
-# # Sat 29 Jul 2023 11:05:59 AEST
-set -o pipefail
-files=(PKGBUILD .SRCINFO)
-
-githubProject="elastic/kibana"
-
-. PKGBUILD || { echo "This script must be placed and run in the AUR package dir" ; exit 1;}
-
-git status >/dev/null 2>&1 || { echo "This script is not suitable for running outside of a git repository." ; exit 1 ;}
-
-githubBaseurl="https://api.github.com/repos"
-githubLatestRelease="$(curl -Ss ${githubBaseurl}/${githubProject}/releases/latest)" || { echo "Failed fetching latest release info from github" ; exit 1;}
-latestRel=$(jq -r .tag_name <<< ${githubLatestRelease} | tr -d [a-z]) || { echo "Failed to read latest version" ; exit 1;}
-
-latestTarUrl="https://github.com/${githubProject}/archive/v${latestRel}.tar.gz"
-
-compareString="(pkgver=${pkgver}, latestRel=${latestRel})"
-
-# Check if latest tag is equal or greater to the current version
-if printf '%s\n%s\n' "${latestRel}" "${pkgver}" | sort --check=quiet --version-sort
-then
- echo "No newer version detected. ${compareString}"
- exit
-else
- echo "New version detected. ${compareString}"
- echo "Downloading latest release to generate a replacement b2sum..."
- newB2sum="$(curl -L --progress-meter "${latestTarUrl}" | b2sum | cut -f1 -d' ')" || { echo "Failed to download the archive for checksumming" ; exit 1;}
- oldB2sum="${b2sums[0]}"
-
- # Update version vars, B2sums and pkgrel
- sed -i -E -e "s/${pkgver//./\\.}/${latestRel}/g" \
- -e "s/${oldB2sum}/${newB2sum}/g" ${files[@]} \
- -e 's/pkgrel=[0-9]+/pkgrel=1/g' -e 's/pkgrel = [0-9]+/pkgrel = 1/g' \
- ${files[@]}
-
- makepkg --verifysource || { echo "Unable to verify sources, please verify checksums."; exit 1;}
- git add ${files[@]}
- echo 'Committing...'
- git commit -m "Version bump to ${latestRel}"
- echo 'Pushing...'
- git push || { echo "Failed to push version bump." ; exit 1;}
-fi