Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6507e069a8 | ||
|
|
3f51386e2c | ||
|
|
acd7c2f699 |
@@ -226,10 +226,13 @@ jobs:
|
|||||||
-o unitdore .
|
-o unitdore .
|
||||||
|
|
||||||
PKGDIR="unitdore_${PKGVER}_${GOARCH}"
|
PKGDIR="unitdore_${PKGVER}_${GOARCH}"
|
||||||
mkdir -p "${PKGDIR}/DEBIAN"
|
# explicit modes: the runner umask can make mkdir -p create 777 dirs,
|
||||||
mkdir -p "${PKGDIR}/usr/bin"
|
# which dpkg-deb rejects
|
||||||
mkdir -p "${PKGDIR}/usr/share/man/man1"
|
install -d -m755 \
|
||||||
mkdir -p "${PKGDIR}/etc/unitdore"
|
"${PKGDIR}/DEBIAN" \
|
||||||
|
"${PKGDIR}/usr/bin" \
|
||||||
|
"${PKGDIR}/usr/share/man/man1" \
|
||||||
|
"${PKGDIR}/etc/unitdore"
|
||||||
|
|
||||||
install -m755 unitdore "${PKGDIR}/usr/bin/unitdore"
|
install -m755 unitdore "${PKGDIR}/usr/bin/unitdore"
|
||||||
install -m644 docs/unitdore.1 "${PKGDIR}/usr/share/man/man1/unitdore.1"
|
install -m644 docs/unitdore.1 "${PKGDIR}/usr/share/man/man1/unitdore.1"
|
||||||
@@ -237,6 +240,7 @@ jobs:
|
|||||||
sed -e "s/VERSION/${PKGVER}/" \
|
sed -e "s/VERSION/${PKGVER}/" \
|
||||||
-e "s/ARCH/${GOARCH}/" \
|
-e "s/ARCH/${GOARCH}/" \
|
||||||
pkg/debian/control > "${PKGDIR}/DEBIAN/control"
|
pkg/debian/control > "${PKGDIR}/DEBIAN/control"
|
||||||
|
chmod 644 "${PKGDIR}/DEBIAN/control"
|
||||||
|
|
||||||
dpkg-deb --build --root-owner-group "${PKGDIR}"
|
dpkg-deb --build --root-owner-group "${PKGDIR}"
|
||||||
echo "Built ${PKGDIR}.deb"
|
echo "Built ${PKGDIR}.deb"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ CONFIG_DIR := /etc/unitdore
|
|||||||
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
||||||
LDFLAGS := -ldflags "-X github.com/warkanum/unitdore/cmd.version=$(VERSION)"
|
LDFLAGS := -ldflags "-X github.com/warkanum/unitdore/cmd.version=$(VERSION)"
|
||||||
|
|
||||||
.PHONY: all build install uninstall test lint clean release-version version-set pkg-checksums
|
.PHONY: all build install uninstall test lint clean release-version pkg-checksums
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
@@ -42,15 +42,25 @@ lint:
|
|||||||
clean:
|
clean:
|
||||||
rm -f $(BINARY)
|
rm -f $(BINARY)
|
||||||
|
|
||||||
## release-version: bump patch version, update source and package versions, commit, tag, and push
|
# VERSION only counts as a release version when given on the command line
|
||||||
|
# (it defaults to git describe for the build flags).
|
||||||
|
RELEASE_VERSION := $(if $(filter command line,$(origin VERSION)),$(patsubst v%,%,$(VERSION)))
|
||||||
|
|
||||||
|
## release-version: bump version (patch, or VERSION=X.Y.Z), update source and package versions, commit, tag, and push
|
||||||
release-version:
|
release-version:
|
||||||
@CURRENT=$$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0"); \
|
@if [ -n "$(RELEASE_VERSION)" ]; then \
|
||||||
|
echo "$(RELEASE_VERSION)" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$$' || { echo "usage: make release-version [VERSION=X.Y.Z]"; exit 1; }; \
|
||||||
|
PKGVER="$(RELEASE_VERSION)"; \
|
||||||
|
else \
|
||||||
|
CURRENT=$$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0"); \
|
||||||
MAJOR=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'); \
|
MAJOR=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'); \
|
||||||
MINOR=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'); \
|
MINOR=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'); \
|
||||||
PATCH=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'); \
|
PATCH=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'); \
|
||||||
NEXT="v$$MAJOR.$$MINOR.$$((PATCH + 1))"; \
|
|
||||||
PKGVER="$$MAJOR.$$MINOR.$$((PATCH + 1))"; \
|
PKGVER="$$MAJOR.$$MINOR.$$((PATCH + 1))"; \
|
||||||
echo "Current: $$CURRENT → Next: $$NEXT"; \
|
fi; \
|
||||||
|
NEXT="v$$PKGVER"; \
|
||||||
|
if git rev-parse -q --verify "refs/tags/$$NEXT" >/dev/null; then echo "tag $$NEXT already exists"; exit 1; fi; \
|
||||||
|
echo "Releasing $$NEXT"; \
|
||||||
scripts/bump-version.sh "$$PKGVER"; \
|
scripts/bump-version.sh "$$PKGVER"; \
|
||||||
git add -A cmd/root.go pkg; \
|
git add -A cmd/root.go pkg; \
|
||||||
git commit -m "chore(release): update package version to $$PKGVER"; \
|
git commit -m "chore(release): update package version to $$PKGVER"; \
|
||||||
@@ -58,12 +68,6 @@ release-version:
|
|||||||
git push origin HEAD "$$NEXT"; \
|
git push origin HEAD "$$NEXT"; \
|
||||||
echo "Pushed $$NEXT — release workflow triggered"
|
echo "Pushed $$NEXT — release workflow triggered"
|
||||||
|
|
||||||
## version-set: set version in source and package files, no commit/tag (make version-set NEW_VERSION=X.Y.Z)
|
|
||||||
version-set:
|
|
||||||
@echo "$(NEW_VERSION)" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$$' || { echo "usage: make version-set NEW_VERSION=X.Y.Z"; exit 1; }
|
|
||||||
scripts/bump-version.sh "$(NEW_VERSION)"
|
|
||||||
@echo "Version set to $(NEW_VERSION) — review with 'git diff', then commit"
|
|
||||||
|
|
||||||
## pkg-checksums: fill the Void checksum from the published release (run after release)
|
## pkg-checksums: fill the Void checksum from the published release (run after release)
|
||||||
pkg-checksums:
|
pkg-checksums:
|
||||||
scripts/update-checksums.sh
|
scripts/update-checksums.sh
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/warkanum/unitdore/sysuser"
|
"github.com/warkanum/unitdore/sysuser"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version = "0.0.12"
|
var version = "1.0.0"
|
||||||
|
|
||||||
var configPath string
|
var configPath string
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# Maintainer: Hein (Warky Devs) <hein@warky.dev>
|
# Maintainer: Hein (Warky Devs) <hein@warky.dev>
|
||||||
pkgname=unitdore
|
pkgname=unitdore
|
||||||
pkgver=0.0.12
|
pkgver=1.0.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="A door you open and close for container units — manage containers via systemd"
|
pkgdesc="A door you open and close for container units — manage containers via systemd"
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Name: unitdore
|
Name: unitdore
|
||||||
Version: 0.0.12
|
Version: 1.0.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Manage container units via systemd
|
Summary: Manage container units via systemd
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Template file for 'unitdore'
|
# Template file for 'unitdore'
|
||||||
pkgname=unitdore
|
pkgname=unitdore
|
||||||
version=0.0.12
|
version=1.0.0
|
||||||
revision=1
|
revision=1
|
||||||
build_style=go
|
build_style=go
|
||||||
go_import_path="github.com/warkanum/unitdore"
|
go_import_path="github.com/warkanum/unitdore"
|
||||||
|
|||||||
Reference in New Issue
Block a user