diff options
| author | Nikolay Govorov <me@govorov.online> | 2026-04-13 04:45:07 +0100 |
|---|---|---|
| committer | Nikolay Govorov <me@govorov.online> | 2026-04-13 04:52:30 +0100 |
| commit | 1c073c677a19c3cf6dafc6d3db4afbbb2000c9d3 (patch) | |
| tree | dca279a0f0477ed19d143116fc8ef5d533ca982c | |
| parent | 41c98766a6c01ae56490de5f8e05102993e7b86f (diff) | |
| download | tar tar.gz tar.bz2 tar.lz tar.xz tar.zst zip | |
More idiomatic folder structure, adds editorconfigs and codeowners (nightly)
Diffstat
| -rw-r--r-- | .editorconfig | 21 | +21 −0 |
| -rw-r--r-- | CODEOWNERS | 5 | +5 −0 |
| -rw-r--r-- | REUSE.toml | 4 | +2 −2 |
| -rw-r--r-- | Taskfile.yml | 8 | +4 −4 |
| -rw-r--r-- | cmd/mirum-server/licenses.go | 2 | +1 −1 |
| -rw-r--r-- | cmd/mirum-server/web/.prettierignore | 2 | +2 −0 |
| -rw-r--r-- | nfpm.yaml | 14 | +7 −7 |
| -rw-r--r-- | packaging/apt-ftparchive.conf (renamed from pkg/apt-ftparchive.conf) | 0 | +0 −0 |
| -rw-r--r-- | packaging/dl/404.html (renamed from pkg/dl/404.html) | 0 | +0 −0 |
| -rw-r--r-- | packaging/dl/index.html (renamed from pkg/dl/index.html) | 0 | +0 −0 |
| -rw-r--r-- | packaging/dl/robots.txt (renamed from pkg/dl/robots.txt) | 0 | +0 −0 |
| -rw-r--r-- | packaging/logo.svg (renamed from pkg/logo.svg) | 0 | +0 −0 |
| -rw-r--r-- | packaging/mirum-server.service (renamed from pkg/mirum-server.service) | 0 | +0 −0 |
| -rw-r--r-- | packaging/mirum-worker@.service (renamed from pkg/mirum-worker@.service) | 0 | +0 −0 |
| -rw-r--r-- | packaging/scripts/postinstall.sh (renamed from pkg/scripts/postinstall.sh) | 0 | +0 −0 |
| -rw-r--r-- | packaging/scripts/preinstall.sh (renamed from pkg/scripts/preinstall.sh) | 0 | +0 −0 |
| -rw-r--r-- | packaging/scripts/preremove.sh (renamed from pkg/scripts/preremove.sh) | 0 | +0 −0 |
| -rw-r--r-- | packaging/server/config.yaml (renamed from pkg/server/config.yaml) | 0 | +0 −0 |
| -rw-r--r-- | packaging/worker/default.yaml (renamed from pkg/worker/default.yaml) | 0 | +0 −0 |
| -rw-r--r-- | tools/licensegen/main.go (renamed from internal/licensegen/main.go) | 0 | +0 −0 |
| -rw-r--r-- | tools/licensegen/scan_go.go (renamed from internal/licensegen/scan_go.go) | 0 | +0 −0 |
| -rw-r--r-- | tools/licensegen/scan_npm.go (renamed from internal/licensegen/scan_npm.go) | 0 | +0 −0 |
22 files changed, 42 insertions, 14 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +# Copyright (c) 2026 Nikolay Govorov +# SPDX-License-Identifier: AGPL-3.0-or-later + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.go] +indent_style = tab + +[{Makefile,*.mk}] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,5 @@ +# Copyright (c) 2026 Nikolay Govorov +# SPDX-License-Identifier: AGPL-3.0-or-later + +* @mrdimidium +cmd/mirum-server/web/ @PaulineNemchak diff --git a/REUSE.toml b/REUSE.toml index 8cd1ea7..791cdce 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -11,8 +11,8 @@ path = [ "cmd/mirum-server/web/*.json", "go.mod", "go.sum", - "pkg/dl/*", - "pkg/logo.svg", + "packaging/dl/*", + "packaging/logo.svg", "buf.*", ] SPDX-FileCopyrightText = "2026 Nikolay Govorov <me@govorov.online>" diff --git a/Taskfile.yml b/Taskfile.yml index e7646ea..d81ad36 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -88,14 +88,14 @@ tasks: sources: - go.sum - cmd/mirum-server/web/package-lock.json - - internal/licensegen/**/*.go + - tools/licensegen/**/*.go - LICENSES.go - LICENSES/*.txt generates: - build/licenses.json cmds: - mkdir -p {{.BUILD_DIR}} - - go run -tags licensegen ./internal/licensegen -out {{.BUILD_DIR}}/licenses.json + - go run -tags licensegen ./tools/licensegen -out {{.BUILD_DIR}}/licenses.json build: desc: "Build binaries (override GOOS/GOARCH for cross-compilation)" @@ -240,7 +240,7 @@ tasks: # Upload static files gpg --export --armor "{{.GPG_KEY_ID}}" > "$GNUPGHOME/public.gpg" rclone copyto "$GNUPGHOME/public.gpg" "s3:{{.S3_BUCKET}}/public.gpg" - rclone copy pkg/dl/ "s3:{{.S3_BUCKET}}/" + rclone copy packaging/dl/ "s3:{{.S3_BUCKET}}/" # APT repository CHANNEL={{.CHANNEL}} @@ -256,7 +256,7 @@ tasks: cp {{.DIST_DIR}}/*.deb apt-repo/pool/$CHANNEL/ cd apt-repo - apt-ftparchive generate "$(pwd)/../pkg/apt-ftparchive.conf" + apt-ftparchive generate "$(pwd)/../packaging/apt-ftparchive.conf" apt-ftparchive \ -o APT::FTPArchive::Release::Codename=$CHANNEL \ -o APT::FTPArchive::Release::Components=main \ diff --git a/cmd/mirum-server/licenses.go b/cmd/mirum-server/licenses.go index d6630ce..ca01f82 100644 --- a/cmd/mirum-server/licenses.go +++ b/cmd/mirum-server/licenses.go @@ -14,7 +14,7 @@ import ( // primarySPDX is the SPDX identifier of mirum itself. const primarySPDX = "AGPL-3.0-or-later" -// licensesPageData mirrors internal/licensegen's Manifest with a primary +// licensesPageData mirrors tools/licensegen's Manifest with a primary // license header prepended. The frontend consumes it verbatim. type licensesPageData struct { Primary struct { diff --git a/cmd/mirum-server/web/.prettierignore b/cmd/mirum-server/web/.prettierignore index d04bea6..b32d4d2 100644 --- a/cmd/mirum-server/web/.prettierignore +++ b/cmd/mirum-server/web/.prettierignore @@ -3,4 +3,6 @@ /node_modules /gen + +# it's a go template, not just a html shell.html diff --git a/nfpm.yaml b/nfpm.yaml index fa12a4a..c776bf7 100644 --- a/nfpm.yaml +++ b/nfpm.yaml @@ -33,7 +33,7 @@ contents: file_info: mode: 0755 - - src: pkg/server/config.yaml + - src: packaging/server/config.yaml dst: /etc/mirum/server/config.yaml type: config|noreplace file_info: @@ -41,7 +41,7 @@ contents: owner: root group: mirum-server - - src: pkg/worker/default.yaml + - src: packaging/worker/default.yaml dst: /etc/mirum/worker/default.yaml type: config|noreplace file_info: @@ -49,12 +49,12 @@ contents: owner: root group: mirum-worker - - src: pkg/mirum-server.service + - src: packaging/mirum-server.service dst: /usr/lib/systemd/system/mirum-server.service file_info: mode: 0644 - - src: pkg/mirum-worker@.service + - src: packaging/mirum-worker@.service dst: /usr/lib/systemd/system/mirum-worker@.service file_info: mode: 0644 @@ -75,9 +75,9 @@ contents: scripts: - preinstall: pkg/scripts/preinstall.sh - postinstall: pkg/scripts/postinstall.sh - preremove: pkg/scripts/preremove.sh + preinstall: packaging/scripts/preinstall.sh + postinstall: packaging/scripts/postinstall.sh + preremove: packaging/scripts/preremove.sh deb: signature: diff --git a/pkg/apt-ftparchive.conf b/packaging/apt-ftparchive.conf index d581965..d581965 100644 --- a/pkg/apt-ftparchive.conf +++ b/packaging/apt-ftparchive.conf diff --git a/pkg/dl/404.html b/packaging/dl/404.html index 3ae5a33..3ae5a33 100644 --- a/pkg/dl/404.html +++ b/packaging/dl/404.html diff --git a/pkg/dl/index.html b/packaging/dl/index.html index 60c970d..60c970d 100644 --- a/pkg/dl/index.html +++ b/packaging/dl/index.html diff --git a/pkg/dl/robots.txt b/packaging/dl/robots.txt index c6742d8..c6742d8 100644 --- a/pkg/dl/robots.txt +++ b/packaging/dl/robots.txt diff --git a/pkg/logo.svg b/packaging/logo.svg index 0a2bfc2..0a2bfc2 100644 --- a/pkg/logo.svg +++ b/packaging/logo.svg diff --git a/pkg/mirum-server.service b/packaging/mirum-server.service index 69e440f..69e440f 100644 --- a/pkg/mirum-server.service +++ b/packaging/mirum-server.service diff --git a/pkg/mirum-worker@.service b/packaging/mirum-worker@.service index dbbc5e0..dbbc5e0 100644 --- a/pkg/mirum-worker@.service +++ b/packaging/mirum-worker@.service diff --git a/pkg/scripts/postinstall.sh b/packaging/scripts/postinstall.sh index 3479c75..3479c75 100644 --- a/pkg/scripts/postinstall.sh +++ b/packaging/scripts/postinstall.sh diff --git a/pkg/scripts/preinstall.sh b/packaging/scripts/preinstall.sh index 15f9f40..15f9f40 100644 --- a/pkg/scripts/preinstall.sh +++ b/packaging/scripts/preinstall.sh diff --git a/pkg/scripts/preremove.sh b/packaging/scripts/preremove.sh index 1c92a81..1c92a81 100644 --- a/pkg/scripts/preremove.sh +++ b/packaging/scripts/preremove.sh diff --git a/pkg/server/config.yaml b/packaging/server/config.yaml index 6ea9881..6ea9881 100644 --- a/pkg/server/config.yaml +++ b/packaging/server/config.yaml diff --git a/pkg/worker/default.yaml b/packaging/worker/default.yaml index a0b8e39..a0b8e39 100644 --- a/pkg/worker/default.yaml +++ b/packaging/worker/default.yaml diff --git a/internal/licensegen/main.go b/tools/licensegen/main.go index cafb861..cafb861 100644 --- a/internal/licensegen/main.go +++ b/tools/licensegen/main.go diff --git a/internal/licensegen/scan_go.go b/tools/licensegen/scan_go.go index 67b7e4b..67b7e4b 100644 --- a/internal/licensegen/scan_go.go +++ b/tools/licensegen/scan_go.go diff --git a/internal/licensegen/scan_npm.go b/tools/licensegen/scan_npm.go index 0cb16f1..0cb16f1 100644 --- a/internal/licensegen/scan_npm.go +++ b/tools/licensegen/scan_npm.go |
