Skip to content

Commit 170f868

Browse files
committed
fix warnings/errors
1 parent 0f2a492 commit 170f868

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

.github/workflows/publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ github.token }}
2222
HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.actor }}
2323
PULL_REQUEST: ${{ github.event.pull_request.number }}
24-
run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST
24+
run: brew pr-pull --debug --tap="${GITHUB_REPOSITORY}" "${PULL_REQUEST}"
2525

2626
- name: Push commits
2727
uses: Homebrew/actions/git-try-push@master
@@ -33,4 +33,4 @@ jobs:
3333
if: github.event.pull_request.head.repo.fork == false
3434
env:
3535
BRANCH: ${{ github.event.pull_request.head.ref }}
36-
run: git push --delete origin $BRANCH
36+
run: git push --delete origin "${BRANCH}"

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22

33
## How do I install these formulae?
44

5-
`brew install indigo-dc/oidc-agent/<formula>`
5+
```
6+
brew install indigo-dc/oidc-agent/<formula>
7+
```
8+
i.e.
9+
```
10+
brew install indigo-dc/oidc-agent/oidc-agent
11+
```
612

713
Or `brew tap indigo-dc/oidc-agent` and then `brew install <formula>`, i.e.
14+
815
```
916
brew tap indigo-dc/oidc-agent
1017
brew install oidc-agent
11-
``````
1218
```
1319

1420
## Documentation

updateToNewestRelease.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash
22

3+
set -e
4+
35
token=$(git config --global github.token)
46

57
json=$(http https://api.github.com/repos/indigo-dc/oidc-agent/releases/latest "Authorization: Bearer ${token}")
6-
tag=$(echo "$json" | jq -r '.tag_name')
8+
tag=$(echo "${json}" | jq -r '.tag_name')
79
version=${tag/#v/}
810

9-
"$(dirname "$0")"/updateToRelease.sh "$version" "$1"
11+
"$(dirname "$0")"/updateToRelease.sh "${version}" "$1"

updateToRelease.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
#!/bin/bash
22

3+
set -e
4+
35
token=$(git config --global github.token)
46
export token
57

68
version=$1
7-
tag="v$version"
9+
tag="v${version}"
810
formula=$2
911

10-
git checkout -b "$version"
12+
git checkout -b "${version}"
1113

1214
tar_url=$(echo "https://github.com/indigo-dc/oidc-agent/archive/refs/tags/VTAG.tar.gz" | sed \"s/VTAG/"${tag}"/g\")
13-
sha256=$(curl -L "$tar_url" 2>/dev/null| sha256sum | awk '{print $1}')
15+
wget "${tar_url}" -O /tmp/prerel.tar.gz -q
16+
sha256_output=$(sha256sum /tmp/prerel.tar.gz)
17+
sha256=$(printf "%s" "${sha256_output}" | awk '{print $1}')
1418

15-
sed -i "s!^[[:space:]]*url\ \".*\"! url\ \"${tar_url}\"!g" "$formula"
16-
sed -i "s/sha256\ \".*\"/sha256\ \"${sha256}\"/g" "$formula"
19+
sed -i "s!^[[:space:]]*url\ \".*\"! url\ \"${tar_url}\"!g" "${formula}"
20+
sed -i "s/sha256\ \".*\"/sha256\ \"${sha256}\"/g" "${formula}"
1721

1822
echo "Updated url to: ${tar_url}"
1923
echo "Updated sha256 to: ${sha256}"
2024

21-
git add "$formula"
25+
git add "${formula}"
2226
git commit -m \""${version}"\"
27+

0 commit comments

Comments
 (0)