Deployr 0.1.0: cross-platform application deployment CLI
Replaces Ninite for endpoint software: one catalog, one command line, and the same behaviour on Windows, macOS and Linux. Single static binary, no server and no agent, driven from an RMM script runner or by hand. - catalog of ~50 apps compiled into the binary, extendable with YAML overlays in catalog.d or via --catalog, no rebuild required - providers: winget, choco, brew, cask, apt, dnf/yum, zypper, pacman, flatpak, snap, plus direct vendor downloads (msi/exe/msu/dmg/pkg/deb/rpm/zip/tar.gz/ AppImage) - sources are tried in order and fall through, so one catalog entry covers winget on Windows, a cask on macOS and the vendor .deb on Debian - provider-independent detection (registry, paths, commands) makes runs idempotent even for software installed by hand - unattended by construction: stdin closed, silent flags, per-command timeouts - handles the traps that break naive wrappers: winget missing under SYSTEM, Homebrew refusing root, 1641/3010 reboot exits, "already installed" reported as failure - --json summary on stdout with progress on stderr, and RMM-friendly exit codes (0 ok, 1 failed, 2 usage, 3 privileges) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
commit
4909edee2d
40 files changed
+6714
No files matched your search
@@ -0,0 +1,42 @@
|
||||
VERSION ?= dev
|
||||
PKG := git.starwarslab.us/ATOM_IT/Deployr/internal/version
|
||||
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo none)
|
||||
DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
LDFLAGS := -s -w -X $(PKG).Version=$(VERSION) -X $(PKG).Commit=$(COMMIT) -X $(PKG).Date=$(DATE)
|
||||
|
||||
.PHONY: all build test vet fmt check dist clean install
|
||||
|
||||
all: check build
|
||||
|
||||
## build: compile for the host platform into ./deployr
|
||||
build:
|
||||
CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" -o deployr ./cmd/deployr
|
||||
|
||||
## test: run the unit tests
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
## vet: static analysis for every supported platform
|
||||
vet:
|
||||
go vet ./...
|
||||
GOOS=windows GOARCH=amd64 go vet ./...
|
||||
GOOS=darwin GOARCH=arm64 go vet ./...
|
||||
GOOS=linux GOARCH=amd64 go vet ./...
|
||||
|
||||
fmt:
|
||||
gofmt -l -w .
|
||||
|
||||
## check: fmt verification, vet and tests -- run this before pushing
|
||||
check: vet test
|
||||
@test -z "$$(gofmt -l . )" || (echo "gofmt needed:"; gofmt -l .; exit 1)
|
||||
|
||||
## dist: cross-compile release binaries into dist/
|
||||
dist:
|
||||
VERSION=$(VERSION) ./scripts/build.sh
|
||||
|
||||
## install: install to /usr/local/bin (Unix)
|
||||
install: build
|
||||
install -m 0755 deployr /usr/local/bin/deployr
|
||||
|
||||
clean:
|
||||
rm -rf dist deployr deployr.exe
|
||||
Reference in new issue
Block a user