Skip to content

Commit 3e14437

Browse files
committed
remove preview cask updating
1 parent 55fb886 commit 3e14437

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
update-cask:
118118
name: Update homebrew-coder cask
119119
runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest'}}
120-
if: ${{ github.repository_owner == 'coder' && !inputs.dryrun }}
120+
if: ${{ github.repository_owner == 'coder' && github.event_name == 'release' }}
121121
needs: build
122122
steps:
123123
- name: Checkout
@@ -133,7 +133,7 @@ jobs:
133133
- name: Update homebrew-coder
134134
env:
135135
GH_TOKEN: ${{ secrets.CODERCI_GITHUB_TOKEN }}
136-
RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || 'preview' }}
136+
RELEASE_TAG: ${{ github.event.release.tag_name }}
137137
ASSIGNEE: ${{ github.actor }}
138138
run: |
139139
git config --global user.email "ci@coder.com"

scripts/update-cask.sh

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ done
3939
echo "Error: VERSION cannot be empty"
4040
exit 1
4141
}
42-
[[ "$VERSION" =~ ^v || "$VERSION" == "preview" ]] || {
42+
[[ "$VERSION" =~ ^v ]] || {
4343
echo "Error: VERSION must start with a 'v'"
4444
exit 1
4545
}
@@ -54,12 +54,6 @@ gh release download "$VERSION" \
5454

5555
HASH=$(shasum -a 256 "$GH_RELEASE_FOLDER"/Coder-Desktop.pkg | awk '{print $1}' | tr -d '\n')
5656

57-
IS_PREVIEW=false
58-
if [[ "$VERSION" == "preview" ]]; then
59-
IS_PREVIEW=true
60-
VERSION=$(make 'print-CURRENT_PROJECT_VERSION' | sed 's/CURRENT_PROJECT_VERSION=//g')
61-
fi
62-
6357
# Check out the homebrew tap repo
6458
TAP_CHECHOUT_FOLDER=$(mktemp -d)
6559

@@ -72,38 +66,27 @@ BREW_BRANCH="auto-release/desktop-$VERSION"
7266
# Check if a PR already exists.
7367
# Continue on a main branch release, as the sha256 will change.
7468
pr_count="$(gh pr list --search "head:$BREW_BRANCH" --json id,closed | jq -r ".[] | select(.closed == false) | .id" | wc -l)"
75-
if [[ "$pr_count" -gt 0 && "$IS_PREVIEW" == false ]]; then
69+
if [[ "$pr_count" -gt 0 ]]; then
7670
echo "Bailing out as PR already exists" 2>&1
7771
exit 0
7872
fi
7973

8074
git checkout -b "$BREW_BRANCH"
8175

82-
# If this is a main branch build, append a preview suffix to the cask.
83-
SUFFIX=""
84-
CONFLICTS_WITH="coder-desktop-preview"
85-
TAG=$VERSION
86-
if [[ "$IS_PREVIEW" == true ]]; then
87-
SUFFIX="-preview"
88-
CONFLICTS_WITH="coder-desktop"
89-
TAG="preview"
90-
fi
91-
9276
mkdir -p "$TAP_CHECHOUT_FOLDER"/Casks
9377

9478
# Overwrite the cask file
95-
cat >"$TAP_CHECHOUT_FOLDER"/Casks/coder-desktop${SUFFIX}.rb <<EOF
96-
cask "coder-desktop${SUFFIX}" do
79+
cat >"$TAP_CHECHOUT_FOLDER"/Casks/coder-desktop.rb <<EOF
80+
cask "coder-desktop" do
9781
version "${VERSION#v}"
98-
sha256 $([ "$IS_PREVIEW" = true ] && echo ":no_check" || echo "\"${HASH}\"")
82+
sha256 "${HASH}"
9983
100-
url "https://github.com/coder/coder-desktop-macos/releases/download/$([ "$IS_PREVIEW" = true ] && echo "${TAG}" || echo "v#{version}")/Coder-Desktop.pkg"
84+
url "https://github.com/coder/coder-desktop-macos/releases/download/v#{version}/Coder-Desktop.pkg"
10185
name "Coder Desktop"
10286
desc "Native desktop client for Coder"
10387
homepage "https://github.com/coder/coder-desktop-macos"
10488
auto_updates true
10589
106-
conflicts_with cask: "coder/coder/${CONFLICTS_WITH}"
10790
depends_on macos: ">= :sonoma"
10891
10992
pkg "Coder-Desktop.pkg"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy