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

Commit508bff6

Browse files
authored
coder 2.1.4 (#96)
1 parenta10fe0c commit508bff6

File tree

7 files changed

+133
-64
lines changed

7 files changed

+133
-64
lines changed

‎.github/workflows/test.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

‎.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name:test
2+
3+
on:
4+
push:
5+
branches:["main"]
6+
pull_request:
7+
branches:["**"]
8+
9+
concurrency:
10+
group:${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress:${{ github.event_name == 'pull_request' }}
12+
13+
jobs:
14+
test:
15+
strategy:
16+
fail-fast:false
17+
matrix:
18+
os:[ubuntu-22.04, macos-13]
19+
20+
runs-on:${{ matrix.os }}
21+
22+
steps:
23+
-name:Set up Homebrew
24+
id:set-up-homebrew
25+
uses:Homebrew/actions/setup-homebrew@master
26+
27+
-name:Cache Homebrew Bundler RubyGems
28+
id:cache
29+
uses:actions/cache@v3
30+
with:
31+
path:${{ steps.set-up-homebrew.outputs.gems-path }}
32+
key:${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
33+
restore-keys:${{ runner.os }}-rubygems-
34+
35+
-name:Install Homebrew Bundler RubyGems
36+
if:steps.cache.outputs.cache-hit != 'true'
37+
run:brew install-bundler-gems
38+
39+
-run:brew test-bot --only-cleanup-before
40+
41+
-run:brew test-bot --only-setup
42+
43+
-run:brew test-bot --only-tap-syntax
44+
45+
-run:brew test-bot --only-formulae
46+
if:github.event_name == 'pull_request'

‎Formula/coder.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
classCoder <Formula
2+
desc"Provisions remote development environments via Terraform"
3+
homepage"https://github.com/coder/coder"
4+
version"2.1.4"
5+
6+
ifOS.mac?
7+
ifHardware::CPU.arm?
8+
url"https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_darwin_arm64.zip"
9+
sha256"ac67c032e81fed7ef3b2e1fc5bfafb878e7551c081d0a136f5a88583c279c060"
10+
else
11+
url"https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_darwin_amd64.zip"
12+
sha256"693d6c450891627d879123ea9a08dc5917dafee7de6c639c5c9b496abe6f250b"
13+
end
14+
else
15+
url"https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_linux_amd64.tar.gz"
16+
sha256"41666bbe3afacd153fbe6c1a2d908bb4fb7a88e821205cb7136a0bad2d1cd6dc"
17+
end
18+
19+
definstall
20+
bin.install"coder"
21+
end
22+
23+
testdo
24+
version_output=shell_output("#{bin}/coder version")
25+
assert_matchversion.to_s,version_output
26+
refute_match"AGPL",version_output
27+
assert_match"Full build",version_output
28+
29+
assert_match"You are not logged in",shell_output("#{bin}/coder netcheck 2>&1",1)
30+
assert_match"postgres://",shell_output("#{bin}/coder server postgres-builtin-url")
31+
end
32+
end

‎coder@1.rbrenamed to‎Formula/coder@1.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@ class CoderAT1 < Formula
44
version"1.44.0"
55

66
ifOS.mac?
7-
url"https://github.com/coder/coder-v1-cli/releases/download/v1.44.0/coder-cli-darwin-amd64.zip"
8-
sha256"f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693"# mac
7+
url"https://github.com/coder/coder-v1-cli/releases/download/v#{version}/coder-cli-darwin-amd64.zip"
8+
sha256"f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693"
99
else
10-
url"https://github.com/coder/coder-v1-cli/releases/download/v1.44.0/coder-cli-linux-amd64.tar.gz"
11-
sha256"642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9"# linux
10+
url"https://github.com/coder/coder-v1-cli/releases/download/v#{version}/coder-cli-linux-amd64.tar.gz"
11+
sha256"642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9"
12+
end
13+
14+
keg_only:versioned_formula
15+
16+
defversion_suffix
17+
version.major.to_s
1218
end
1319

1420
definstall
1521
bin.install"coder"
1622
end
23+
1724
testdo
1825
system"#{bin}/coder","--version"
1926
end

‎ci/update.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎scripts/update-v1.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Updates the coder@1 formula
4+
# ./update.sh "<version>" "<darwin-amd64-zip-SHA256>" "<linux-amd64-targz-SHA256>"
5+
6+
set -euo pipefail
7+
cd"$(dirname"$0")"
8+
9+
version="$1"
10+
darwin_sha="$(echo"$2"| tr"[:upper:]""[:lower:]")"
11+
linux_sha="$(echo"$3"| tr"[:upper:]""[:lower:]")"
12+
13+
# Replace version
14+
sed -i"s/version\"[0-9.]*\"/version\"$version\"/g""../Formula/coder@1.rb"
15+
16+
# Update macOS hash
17+
sed -zi"s/sha256\"[a-f0-9]*\"/sha256\"$darwin_sha\"/1""../Formula/coder@1.rb"
18+
19+
# Update Linux hash
20+
sed -zi"s/sha256\"[a-f0-9]*\"/sha256\"$linux_sha\"/2""../Formula/coder@1.rb"

‎scripts/update-v2.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Updates the coder formula
4+
# ./update.sh "<version>" "<darwin-arm64-zip-SHA256>" "<darwin-amd64-zip-SHA256>" "<linux-amd64-targz-SHA256>"
5+
6+
set -euo pipefail
7+
cd"$(dirname"$0")"
8+
9+
version="$1"
10+
darwin_arm_sha="$(echo"$2"| tr"[:upper:]""[:lower:]")"
11+
darwin_intel_sha="$(echo"$3"| tr"[:upper:]""[:lower:]")"
12+
linux_sha="$(echo"$4"| tr"[:upper:]""[:lower:]")"
13+
14+
# Replace version
15+
sed -i"s/version\"[0-9.]*\"/version\"$version\"/g""../Formula/coder.rb"
16+
17+
# Update macOS ARM hash
18+
sed -zi"s/sha256\"[a-f0-9]*\"/sha256\"$darwin_arm_sha\"/1""../Formula/coder.rb"
19+
20+
# Update macOS Intel hash
21+
sed -zi"s/sha256\"[a-f0-9]*\"/sha256\"$darwin_intel_sha\"/2""../Formula/coder.rb"
22+
23+
# Update Linux hash
24+
sed -zi"s/sha256\"[a-f0-9]*\"/sha256\"$linux_sha\"/3""../Formula/coder.rb"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp