Documentation
¶
Overview ¶
Package packaging describes what a release package contains.
It exists so that the answer lives in one place instead of three. The same list has to be true of .goreleaser.yml, of the zip an operator downloads and of the README that tells them what is in it, and the tests beside this file check all three against what is written here. Nothing in the server imports it: the binary does not read its own packaging.
The names are the contract an operator sees, so changing one is a change to the product, not a refactor. Someone has a script that fetches pacenote-ce_1.2.0_linux_amd64.zip.
Index ¶
Constants ¶
const Binary = "pacenote-server"
Binary is the program inside the archive, without the .exe that Windows wants. See BinaryName.
const Checksums = "checksums.txt"
Checksums is the single file covering every archive in a release.
const Project = "pacenote-ce"
Project is the name every archive starts with. It is not the binary's name — "pacenote-ce" says which edition the download is, and pacenote-server says which program is inside it.
Variables ¶
This section is empty.
Functions ¶
func ArchiveName ¶
ArchiveName is the file an operator downloads:
pacenote-ce_0.1.0_linux_amd64.zip
The version carries no leading v, because that is what GoReleaser's .Version interpolates and a name that disagrees with the tool that writes it is a name that will drift.
func BinaryName ¶
BinaryName is the binary's file name on one platform.
func Contents ¶
Contents is every entry inside one platform's archive, sorted, which is what a test compares a real zip against.
func Docs ¶
Docs is every file an operator reads, in the order they need them: what this is and how to run it, then the terms, then what changed. They sit beside the binary rather than in a docs directory, because a directory is one more thing to open.
The value is the path in this repository the file is taken from; the key is where it lands in the archive.
Types ¶
type Platform ¶
type Platform struct {
// OS is a GOOS: linux, darwin or windows.
OS string
// Arch is a GOARCH: amd64 or arm64.
Arch string
}
Platform is one build target.
func Platforms ¶
func Platforms() []Platform
Platforms is every target a release ships, and therefore every target that is supported. Adding one here is a promise to keep it building.
windows/arm64 is absent on purpose: nobody runs a team server on it, and a binary nobody runs is a binary nobody notices breaking.