@@ -4,12 +4,12 @@ set -euo pipefail
44usage () {
55 echo " Usage: $0 [--version <version>] [--assignee <github handle>]"
66 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)"
88 echo " -h, --help Display this help message"
99}
1010
1111VERSION=" "
12- ASSIGNE =" "
12+ ASSIGNEE =" "
1313
1414# Parse command line arguments
1515while [[ " $# " -gt 0 ]]; do
@@ -19,7 +19,7 @@ while [[ "$#" -gt 0 ]]; do
1919 shift 2
2020 ;;
2121 --assignee)
22- ASSIGNE =" $2 "
22+ ASSIGNEE =" $2 "
2323 shift 2
2424 ;;
2525 -h | --help)
@@ -55,11 +55,11 @@ gh release download "$VERSION" \
5555HASH=$( shasum -a 256 " $GH_RELEASE_FOLDER " /Coder-Desktop.pkg | awk ' {print $1}' | tr -d ' \n' )
5656
5757# Check out the homebrew tap repo
58- TAP_CHECHOUT_FOLDER =$( mktemp -d)
58+ TAP_CHECKOUT_FOLDER =$( mktemp -d)
5959
60- gh repo clone " coder/homebrew-coder" " $TAP_CHECHOUT_FOLDER "
60+ gh repo clone " coder/homebrew-coder" " $TAP_CHECKOUT_FOLDER "
6161
62- cd " $TAP_CHECHOUT_FOLDER "
62+ cd " $TAP_CHECKOUT_FOLDER "
6363
6464BREW_BRANCH=" auto-release/desktop-$VERSION "
6565
7373
7474git checkout -b " $BREW_BRANCH "
7575
76- mkdir -p " $TAP_CHECHOUT_FOLDER " /Casks
76+ mkdir -p " $TAP_CHECKOUT_FOLDER " /Casks
7777
7878# Overwrite the cask file
79- cat > " $TAP_CHECHOUT_FOLDER " /Casks/coder-desktop.rb << EOF
79+ cat > " $TAP_CHECKOUT_FOLDER " /Casks/coder-desktop.rb << EOF
8080cask "coder-desktop" do
8181 version "${VERSION# v} "
8282 sha256 "${HASH} "
@@ -116,5 +116,5 @@ if [[ "$pr_count" -eq 0 ]]; then
116116 --base master --head " $BREW_BRANCH " \
117117 --title " Coder Desktop $VERSION " \
118118 --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 " }
120120fi
0 commit comments