Skip to content

Commit 565c9f1

Browse files
committed
devproc initial build
1 parent 230a0a7 commit 565c9f1

27 files changed

Lines changed: 3795 additions & 1 deletion

.github/workflows/release.yml

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- os: macos-14
17+
target: darwin-arm64
18+
- os: macos-13
19+
target: darwin-x64
20+
- os: ubuntu-latest
21+
target: linux-x64
22+
- os: ubuntu-latest
23+
target: linux-arm64
24+
25+
runs-on: ${{ matrix.os }}
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Bun
32+
uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version: latest
35+
36+
- name: Install dependencies
37+
run: bun install
38+
39+
- name: Build binary
40+
run: |
41+
cat > build-single.ts << 'EOF'
42+
import solidPlugin from "./node_modules/@opentui/solid/scripts/solid-plugin";
43+
const target = process.argv[2];
44+
const result = await Bun.build({
45+
entrypoints: ["./src/index.tsx"],
46+
target: "bun",
47+
plugins: [solidPlugin],
48+
minify: true,
49+
compile: {
50+
target: `bun-${target}` as any,
51+
outfile: `dist/devproc-${target}`,
52+
},
53+
});
54+
if (!result.success) {
55+
console.error("Build failed:", result.logs);
56+
process.exit(1);
57+
}
58+
EOF
59+
mkdir -p dist
60+
bun run build-single.ts ${{ matrix.target }}
61+
62+
- name: Create tarball
63+
run: |
64+
cd dist
65+
tar -czf devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz --transform 's/devproc-${{ matrix.target }}/devproc/' devproc-${{ matrix.target }}
66+
shasum -a 256 devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz > devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz.sha256
67+
68+
- name: Upload artifact
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: devproc-${{ matrix.target }}
72+
path: |
73+
dist/devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
74+
dist/devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz.sha256
75+
76+
release:
77+
needs: build
78+
runs-on: ubuntu-latest
79+
80+
steps:
81+
- name: Checkout
82+
uses: actions/checkout@v4
83+
84+
- name: Download all artifacts
85+
uses: actions/download-artifact@v4
86+
with:
87+
path: artifacts
88+
merge-multiple: true
89+
90+
- name: Create checksums and get SHAs
91+
id: checksums
92+
run: |
93+
cd artifacts
94+
cat *.sha256 > checksums.txt
95+
cat checksums.txt
96+
echo "darwin_arm64=$(grep darwin-arm64 *.sha256 | head -1 | cut -d' ' -f1)" >> $GITHUB_OUTPUT
97+
echo "darwin_x64=$(grep darwin-x64 *.sha256 | head -1 | cut -d' ' -f1)" >> $GITHUB_OUTPUT
98+
echo "linux_x64=$(grep linux-x64 *.sha256 | head -1 | cut -d' ' -f1)" >> $GITHUB_OUTPUT
99+
echo "linux_arm64=$(grep linux-arm64 *.sha256 | head -1 | cut -d' ' -f1)" >> $GITHUB_OUTPUT
100+
101+
- name: Create Release
102+
uses: softprops/action-gh-release@v2
103+
with:
104+
files: |
105+
artifacts/*.tar.gz
106+
artifacts/checksums.txt
107+
generate_release_notes: true
108+
draft: false
109+
prerelease: ${{ contains(github.ref, '-') }}
110+
111+
- name: Extract version
112+
id: version
113+
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
114+
115+
- name: Update Homebrew formula
116+
run: |
117+
VERSION="${{ steps.version.outputs.version }}"
118+
DARWIN_ARM64="${{ steps.checksums.outputs.darwin_arm64 }}"
119+
DARWIN_X64="${{ steps.checksums.outputs.darwin_x64 }}"
120+
LINUX_X64="${{ steps.checksums.outputs.linux_x64 }}"
121+
LINUX_ARM64="${{ steps.checksums.outputs.linux_arm64 }}"
122+
123+
cat > Formula/devproc.rb << EOF
124+
# typed: false
125+
# frozen_string_literal: true
126+
127+
class Devproc < Formula
128+
desc "Terminal UI for managing local development environments"
129+
homepage "https://github.com/captjt/devproc"
130+
version "${VERSION}"
131+
license "MIT"
132+
133+
on_macos do
134+
if Hardware::CPU.arm?
135+
url "https://github.com/captjt/devproc/releases/download/v${VERSION}/devproc-v${VERSION}-darwin-arm64.tar.gz"
136+
sha256 "${DARWIN_ARM64}"
137+
else
138+
url "https://github.com/captjt/devproc/releases/download/v${VERSION}/devproc-v${VERSION}-darwin-x64.tar.gz"
139+
sha256 "${DARWIN_X64}"
140+
end
141+
end
142+
143+
on_linux do
144+
if Hardware::CPU.arm?
145+
url "https://github.com/captjt/devproc/releases/download/v${VERSION}/devproc-v${VERSION}-linux-arm64.tar.gz"
146+
sha256 "${LINUX_ARM64}"
147+
else
148+
url "https://github.com/captjt/devproc/releases/download/v${VERSION}/devproc-v${VERSION}-linux-x64.tar.gz"
149+
sha256 "${LINUX_X64}"
150+
end
151+
end
152+
153+
def install
154+
bin.install "devproc"
155+
end
156+
157+
test do
158+
assert_match "DevProc v#{version}", shell_output("#{bin}/devproc --version")
159+
end
160+
end
161+
EOF
162+
163+
- name: Commit formula update
164+
run: |
165+
git config user.name "github-actions[bot]"
166+
git config user.email "github-actions[bot]@users.noreply.github.com"
167+
git add Formula/devproc.rb
168+
git commit -m "Update Homebrew formula to v${{ steps.version.outputs.version }}"
169+
git push origin HEAD:master

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# dependencies
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
build
8+
*.tgz
9+
*.bun-build
10+
11+
# code coverage
12+
coverage
13+
*.lcov
14+
15+
# logs
16+
logs
17+
*.log
18+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
19+
20+
# dotenv environment variable files
21+
.env
22+
.env.development.local
23+
.env.test.local
24+
.env.production.local
25+
.env.local
26+
27+
# caches
28+
.eslintcache
29+
.cache
30+
*.tsbuildinfo
31+
32+
# IDEs
33+
.idea
34+
.vscode
35+
.cursor
36+
37+
# OS files
38+
.DS_Store
39+
Thumbs.db
40+
41+
# AI assistant files
42+
CLAUDE.md
43+
44+
# misc
45+
.ignore

Formula/devproc.rb

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# typed: false
2+
# frozen_string_literal: true
3+
4+
# Homebrew formula for DevProc
5+
6+
class Devproc < Formula
7+
desc "Terminal UI for managing local development environments"
8+
homepage "https://github.com/captjt/devproc"
9+
version "0.1.0"
10+
license "MIT"
11+
12+
on_macos do
13+
if Hardware::CPU.arm?
14+
url "https://github.com/captjt/devproc/releases/download/v#{version}/devproc-v#{version}-darwin-arm64.tar.gz"
15+
sha256 "PLACEHOLDER_DARWIN_ARM64_SHA256"
16+
else
17+
url "https://github.com/captjt/devproc/releases/download/v#{version}/devproc-v#{version}-darwin-x64.tar.gz"
18+
sha256 "PLACEHOLDER_DARWIN_X64_SHA256"
19+
end
20+
end
21+
22+
on_linux do
23+
if Hardware::CPU.arm?
24+
url "https://github.com/captjt/devproc/releases/download/v#{version}/devproc-v#{version}-linux-arm64.tar.gz"
25+
sha256 "PLACEHOLDER_LINUX_ARM64_SHA256"
26+
else
27+
url "https://github.com/captjt/devproc/releases/download/v#{version}/devproc-v#{version}-linux-x64.tar.gz"
28+
sha256 "PLACEHOLDER_LINUX_X64_SHA256"
29+
end
30+
end
31+
32+
def install
33+
bin.install "devproc"
34+
end
35+
36+
test do
37+
assert_match "DevProc v#{version}", shell_output("#{bin}/devproc --version")
38+
end
39+
end

0 commit comments

Comments
 (0)