Skip to content

Commit

Permalink
updating to 1.1.0-15
Browse files Browse the repository at this point in the history
  • Loading branch information
yaleman committed Nov 3, 2023
1 parent 0d84ce1 commit cfb8d1c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
22 changes: 12 additions & 10 deletions homebrew_check_latest_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ else
echo "SPECFILE: ${SPECFILE}"
fi

LATEST="$(get_latest_release "https://api.github.com/repos/kanidm/kanidm/releases")"

# grab the update url from the spec file
URL=$(grep -E homepage "${SPECFILE}" | awk '{print $NF}' | tr -d '"')
if [ -z "${URL}" ]; then
echo "Failed to find check URL, bailing!"
exit 1
else
echo "Check URL: ${URL}"
fi
# URL=$(grep -E homepage "${SPECFILE}" | awk '{print $NF}' | tr -d '"')
# if [ -z "${URL}" ]; then
# echo "Failed to find check URL, bailing!"
# exit 1
# else
# echo "Check URL: ${URL}"
# fi


# pull the latest version
LATEST="$(curl -sL "${URL}" | jq -r '.tag_name')"
# LATEST="$(curl -sL "${URL}" | jq -r '.tag_name')"
if [ -z "${LATEST}" ]; then
echo "Failed to find latest version, bailing!"
exit 1
Expand Down Expand Up @@ -74,8 +76,8 @@ fi

echo "Updating file"
# updates the file
sed -i'' -E "s/version \\\".*/version \"${LATEST}\"/g" "${SPECFILE}"
sed -i'' -E "s/sha256 \\\".*/sha256 \"${FILEHASH}\"/g" "${SPECFILE}"
sed -i '' -E "s/version \\\".*/version \"${LATEST}\"/g" "${SPECFILE}"
sed -i '' -E "s/sha256 \\\".*/sha256 \"${FILEHASH}\"/g" "${SPECFILE}"

DIFF_LINES="$(git diff | wc -l)"
if [ "${DIFF_LINES}" -ne 0 ]; then
Expand Down
4 changes: 2 additions & 2 deletions kanidm.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Kanidm < Formula
desc "Kanidm CLI"
version "v1.1.0-beta.13"
version "v1.1.0-rc.15"
homepage "https://api.github.com/kanidm/kanidm/releases/latest"
url "https://github.com/kanidm/kanidm/archive/refs/tags/#{version}.tar.gz"
sha256 "e378ab384cc9bc88e554f7ce7002cc23c7cbac419ea7796f74b67a6e4542b0da"
sha256 "b123771e1b06769ff8032a4c38fac3ca5c02a28a42c15216ddf50792ca879ba2"
license "Mozilla Public License 2.0"
head "https://github.com/kanidm/kanidm.git", branch: "master"

Expand Down

0 comments on commit cfb8d1c

Please sign in to comment.