@@ -4,12 +4,12 @@ set -euo pipefail
4
4
usage () {
5
5
echo " Usage: $0 [--version <version>] [--assignee <github handle>]"
6
6
echo " --version <version> Set the VERSION variable to fetch and generate the cask file for"
7
- echo " --assignee <github handle> Set the ASSIGNE variable to assign the PR to (optional)"
7
+ echo " --assignee <github handle> Set the ASSIGNEE variable to assign the PR to (optional)"
8
8
echo " -h, --help Display this help message"
9
9
}
10
10
11
11
VERSION=" "
12
- ASSIGNE =" "
12
+ ASSIGNEE =" "
13
13
14
14
# Parse command line arguments
15
15
while [[ " $# " -gt 0 ]]; do
@@ -19,7 +19,7 @@ while [[ "$#" -gt 0 ]]; do
19
19
shift 2
20
20
;;
21
21
--assignee)
22
- ASSIGNE =" $2 "
22
+ ASSIGNEE =" $2 "
23
23
shift 2
24
24
;;
25
25
-h | --help)
@@ -55,11 +55,11 @@ gh release download "$VERSION" \
55
55
HASH=$( shasum -a 256 " $GH_RELEASE_FOLDER " /Coder-Desktop.pkg | awk ' {print $1}' | tr -d ' \n' )
56
56
57
57
# Check out the homebrew tap repo
58
- TAP_CHECHOUT_FOLDER =$( mktemp -d)
58
+ TAP_CHECKOUT_FOLDER =$( mktemp -d)
59
59
60
- gh repo clone " coder/homebrew-coder" " $TAP_CHECHOUT_FOLDER "
60
+ gh repo clone " coder/homebrew-coder" " $TAP_CHECKOUT_FOLDER "
61
61
62
- cd " $TAP_CHECHOUT_FOLDER "
62
+ cd " $TAP_CHECKOUT_FOLDER "
63
63
64
64
BREW_BRANCH=" auto-release/desktop-$VERSION "
65
65
73
73
74
74
git checkout -b " $BREW_BRANCH "
75
75
76
- mkdir -p " $TAP_CHECHOUT_FOLDER " /Casks
76
+ mkdir -p " $TAP_CHECKOUT_FOLDER " /Casks
77
77
78
78
# Overwrite the cask file
79
- cat > " $TAP_CHECHOUT_FOLDER " /Casks/coder-desktop.rb << EOF
79
+ cat > " $TAP_CHECKOUT_FOLDER " /Casks/coder-desktop.rb << EOF
80
80
cask "coder-desktop" do
81
81
version "${VERSION# v} "
82
82
sha256 "${HASH} "
@@ -116,5 +116,5 @@ if [[ "$pr_count" -eq 0 ]]; then
116
116
--base master --head " $BREW_BRANCH " \
117
117
--title " Coder Desktop $VERSION " \
118
118
--body " This automatic PR was triggered by the release of Coder Desktop $VERSION " \
119
- ${ASSIGNE : + --assignee " $ASSIGNE " --reviewer " $ASSIGNE " }
119
+ ${ASSIGNEE : + --assignee " $ASSIGNEE " --reviewer " $ASSIGNEE " }
120
120
fi
0 commit comments