Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: install from homebrew in install.sh#9414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 3 commits intomainfrominstall-from-homebrew
Aug 30, 2023
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 40 additions & 5 deletionsinstall.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -67,8 +67,8 @@ The detection method works as follows:
- Debian, Ubuntu, Raspbian: install the deb package from GitHub.
- Fedora, CentOS, RHEL, openSUSE: install the rpm package from GitHub.
- Alpine: install the apk package from GitHub.
- macOS: install therelease from GitHub.
-All others: install the release from GitHub.
- macOS: if \`brew\` is available,installfromthecoder/coder Homebrew tap.
-Otherwise, download from GitHub and install into \`--prefix\`.

We build releases on GitHub for amd64, armv7, and arm64 on Windows, Linux, and macOS.

Expand DownExpand Up@@ -118,6 +118,26 @@ Run Coder:
EOF
}

echo_brew_postinstall() {
if [ "${DRY_RUN-}" ]; then
echo_dryrun_postinstall
return
fi

cath <<EOF
brew formula has been installed.

To run a Coder server:

$ coder server

To connect to a Coder deployment:

$ coder login <deployment url>

EOF
}

echo_systemd_postinstall() {
if [ "${DRY_RUN-}" ]; then
echo_dryrun_postinstall
Expand DownExpand Up@@ -303,9 +323,7 @@ main() {
DISTRO=${DISTRO:-$(distro)}

case $DISTRO in
# macOS uses the standalone installation for now.
# Homebrew support is planned. See: https://github.com/coder/coder/issues/1925
macos) install_standalone ;;
darwin) install_macos ;;
# The .deb and .rpm files are pulled from GitHub.
debian) install_deb ;;
fedora | opensuse) install_rpm ;;
Expand DownExpand Up@@ -408,6 +426,23 @@ with_terraform() {
"$sh_c" cp "$CACHE_DIR/terraform" "$COPY_LOCATION"
}

install_macos() {
# If there is no `brew` binary available, just default to installing standalone
if command_exists brew; then
echoh "Installing v$VERSION of the coder formula from coder/coder."
echoh

sh_c brew install coder/coder/coder

echo_brew_postinstall
return
fi

echoh "Homebrew is not available."
echoh "Falling back to standalone installation."
install_standalone
}

install_deb() {
echoh "Installing v$VERSION of the $ARCH deb package from GitHub."
echoh
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp