Skip to content

Commit 1f3a38f

Browse files
committed
feat: initial release
0 parents  commit 1f3a38f

203 files changed

Lines changed: 34217 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EditorConfig for consistent coding styles
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.go]
13+
indent_style = tab
14+
indent_size = 4
15+
16+
[*.{yml,yaml}]
17+
indent_style = space
18+
indent_size = 2
19+
20+
[*.{json,md}]
21+
indent_style = space
22+
indent_size = 2
23+
24+
[Makefile]
25+
indent_style = tab
26+
27+
[*.sh]
28+
indent_style = space
29+
indent_size = 2

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
ci:
18+
name: CI
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-go@v5
24+
with:
25+
go-version-file: 'go.mod'
26+
cache: true
27+
28+
- name: Format check
29+
run: |
30+
gofmt -s -l . | tee /tmp/gofmt.out
31+
test ! -s /tmp/gofmt.out
32+
33+
- name: Vet
34+
run: go vet ./...
35+
36+
- name: Test
37+
run: go test -race -timeout=2m ./...
38+
39+
- name: Staticcheck
40+
uses: dominikh/staticcheck-action@v1
41+
with:
42+
version: latest
43+
install-go: false
44+
45+
- name: Vulncheck
46+
run: |
47+
go install golang.org/x/vuln/cmd/govulncheck@latest
48+
govulncheck ./...

.github/workflows/homebrew.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Homebrew
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
update:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: dawidd6/action-homebrew-bump-formula@v3
12+
with:
13+
tap: matzehuels/homebrew-tap
14+
formula: stacktower
15+
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
16+
continue-on-error: true

.github/workflows/pages.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'blogpost/**'
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/configure-pages@v5
24+
- uses: actions/upload-pages-artifact@v3
25+
with:
26+
path: blogpost
27+
- uses: actions/deploy-pages@v4
28+
id: deployment

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- uses: actions/setup-go@v5
21+
with:
22+
go-version-file: 'go.mod'
23+
cache: true
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v6
27+
with:
28+
version: latest
29+
args: release --clean
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
/bin/
8+
/dist/ # GoReleaser output
9+
10+
# Test binary, built with `go test -c`
11+
*.test
12+
13+
# Output of the go coverage tool
14+
*.out
15+
coverage.out
16+
coverage.html
17+
18+
# Go workspace file
19+
go.work
20+
go.work.sum
21+
22+
# IDE
23+
.vscode/
24+
.idea/
25+
*.swp
26+
*.swo
27+
*~
28+
.DS_Store
29+
30+
# bin
31+
bin/
32+
33+
# Output directories
34+
/output/
35+
/rendered/
36+
*.svg
37+
*.txt
38+
!examples/**/*.txt
39+
!pkg/render/tower/styles/handdrawn/brittle-bg-base64.txt
40+
!examples/**/*.svg
41+
!blogpost/plots/**/*.svg
42+
43+
# Temporary files
44+
tmp/
45+
temp/
46+
.tmp/
47+
48+
# Benchmarking
49+
flamegraph.svg
50+
perf.data*
51+
*.prof
52+
*.pprof
53+
54+
# Generated graphs (test fixtures kept)
55+
graphs/*.json
56+
!graphs/.gitkeep
57+
58+
# Legacy Rust code (if still relevant)
59+
/_legacy/target/
60+
**/*.rs.bk
61+
Cargo.lock

.golangci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: "2"
2+
3+
run:
4+
timeout: 5m
5+
tests: false
6+
7+
linters:
8+
enable:
9+
- errcheck
10+
- govet
11+
- staticcheck
12+
- unused
13+
- ineffassign
14+
15+
issues:
16+
max-issues-per-linter: 0
17+
max-same-issues: 0

.goreleaser.yaml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# GoReleaser configuration
2+
# Documentation: https://goreleaser.com
3+
4+
version: 2
5+
6+
before:
7+
hooks:
8+
# Ensure dependencies are up to date
9+
- go mod tidy
10+
# Run tests before building
11+
- go test ./...
12+
13+
builds:
14+
- id: stacktower
15+
main: ./main.go
16+
binary: stacktower
17+
env:
18+
- CGO_ENABLED=0
19+
goos:
20+
- linux
21+
- darwin
22+
- windows
23+
goarch:
24+
- amd64
25+
- arm64
26+
# Don't build darwin/arm64 on Go < 1.16
27+
ignore:
28+
- goos: darwin
29+
goarch: arm64
30+
ldflags:
31+
- -s -w
32+
- -X main.version={{.Version}}
33+
- -X main.commit={{.Commit}}
34+
- -X main.date={{.Date}}
35+
36+
archives:
37+
- id: stacktower
38+
format: tar.gz
39+
name_template: >-
40+
{{ .ProjectName }}_
41+
{{- .Version }}_
42+
{{- title .Os }}_
43+
{{- if eq .Arch "amd64" }}x86_64
44+
{{- else if eq .Arch "386" }}i386
45+
{{- else }}{{ .Arch }}{{ end }}
46+
{{- if .Arm }}v{{ .Arm }}{{ end }}
47+
format_overrides:
48+
- goos: windows
49+
format: zip
50+
files:
51+
- LICENSE
52+
- README.md
53+
54+
checksum:
55+
name_template: 'checksums.txt'
56+
57+
snapshot:
58+
name_template: "{{ incpatch .Version }}-next"
59+
60+
changelog:
61+
sort: asc
62+
use: github
63+
filters:
64+
exclude:
65+
- '^docs:'
66+
- '^test:'
67+
- '^chore:'
68+
- '^ci:'
69+
- 'README'
70+
- Merge pull request
71+
- Merge branch
72+
groups:
73+
- title: Features
74+
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
75+
order: 0
76+
- title: Bug Fixes
77+
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
78+
order: 1
79+
- title: Performance
80+
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
81+
order: 2
82+
- title: Others
83+
order: 999
84+
85+
release:
86+
github:
87+
owner: matzehuels
88+
name: stacktower
89+
draft: false
90+
prerelease: auto
91+
name_template: "{{.ProjectName}} v{{.Version}}"
92+
header: |
93+
## Stacktower {{.Version}}
94+
95+
A tool for visualizing dependency graphs as elegant "stack tower" diagrams.
96+
97+
### Installation
98+
99+
Download the appropriate binary for your platform below, or install via Go:
100+
101+
```bash
102+
go install github.com/matzehuels/stacktower@{{.Tag}}
103+
```
104+
105+
footer: |
106+
**Full Changelog**: https://github.com/matzehuels/stacktower/compare/{{ .PreviousTag }}...{{ .Tag }}
107+
108+
# Homebrew tap (disabled until ready)
109+
# Uncomment and create homebrew-tap repo when ready for brew distribution
110+
# brews:
111+
# - name: stacktower
112+
# repository:
113+
# owner: matzehuels
114+
# name: homebrew-tap
115+
# folder: Formula
116+
# homepage: https://github.com/matzehuels/stacktower
117+
# description: Visualize dependency graphs as elegant "stack tower" diagrams
118+
# license: MIT
119+
# test: |
120+
# system "#{bin}/stacktower --version"
121+
# install: |
122+
# bin.install "stacktower"

0 commit comments

Comments
 (0)