Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/agent_local/package/linux/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "authentik-agent"
arch: "${ARCH}"
platform: "linux"
version: "${VERSION}+ak-${VERSION_HASH_SHORT}"
version: "${VERSION_PKG}"
description: |
authentik Agent
vendor: "Authentik Security Inc."
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent_system/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ package-gnu/linux: build
$(call nfpm_package,${TOP}/cmd/${TARGET}/package/linux/nfpm.yaml)

test-deploy: package-gnu/linux
$(TME) dpkg -i /workspaces/bin/${TARGET}/authentik-sysd_${VERSION}+ak-${VERSION_HASH_SHORT}_${ARCH}.deb
$(TME) dpkg -i /workspaces/bin/${TARGET}/authentik-sysd_${VERSION}+_${ARCH}.deb
$(TME) systemctl restart ak-sysd
2 changes: 1 addition & 1 deletion cmd/agent_system/package/linux/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "authentik-sysd"
arch: "${ARCH}"
platform: "linux"
version: "${VERSION}+ak-${VERSION_HASH_SHORT}"
version: "${VERSION_PKG}"
description: |
authentik System Agent
vendor: "Authentik Security Inc."
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ package-gnu/linux: build
$(call nfpm_package,${TOP}/cmd/${TARGET}/package/linux/nfpm.yaml)

test-deploy: package-gnu/linux
$(TME) dpkg -i /workspaces/bin/${TARGET}/authentik-${TARGET}_${VERSION}+ak-${VERSION_HASH_SHORT}_${ARCH}.deb
$(TME) dpkg -i /workspaces/bin/${TARGET}/authentik-${TARGET}_${VERSION}+_${ARCH}.deb
$(TME) systemctl restart ssh
sudo dpkg -i ${TOP}/bin/${TARGET}/authentik-${TARGET}_${VERSION}+ak-${VERSION_HASH_SHORT}_${ARCH}.deb
sudo dpkg -i ${TOP}/bin/${TARGET}/authentik-${TARGET}_${VERSION}+_${ARCH}.deb
2 changes: 1 addition & 1 deletion cmd/cli/package/linux/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "authentik-cli"
arch: "${ARCH}"
platform: "linux"
version: "${VERSION}+ak-${VERSION_HASH_SHORT}"
version: "${VERSION_PKG}"
description: |
authentik CLI
vendor: "Authentik Security Inc."
Expand Down
14 changes: 11 additions & 3 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ UID = $(shell id -u)
GID = $(shell id -g)
VERSION = 0.43.1
VERSION_HASH = $(shell git rev-parse HEAD)
VERSION_HASH_SHORT = $(shell git rev-parse HEAD | head -c 8)
VERSION_TAG = $(shell git tag --points-at HEAD)
ifeq ($(GITHUB_ACTIONS),true)
ifeq ($(AK_IS_RELEASE),true)
VERSION_PKG = ${VERSION}
else
VERSION_PKG = ${VERSION}+ak-${shell git rev-parse HEAD | head -c 8}
endif
else
VERSION_PKG = ${VERSION}
endif
VERSION_TS = $(shell date +%s)
PLATFORM := $(shell bash -c "uname -o | tr '[:upper:]' '[:lower:]'")
ifeq ($(OS),Windows_NT)
Expand Down Expand Up @@ -66,13 +74,13 @@ define go_generate_resources
endef

define nfpm_package
VERSION=${VERSION} VERSION_HASH_SHORT=${VERSION_HASH_SHORT} ARCH=${ARCH} \
VERSION_PKG=${VERSION_PKG} ARCH=${ARCH} \
go tool github.com/goreleaser/nfpm/v2/cmd/nfpm \
package \
-p deb \
-t ${TOP}/bin/${TARGET} \
-f $(1)
VERSION=${VERSION} VERSION_HASH_SHORT=${VERSION_HASH_SHORT} ARCH=${ARCH} \
VERSION_PKG=${VERSION_PKG} ARCH=${ARCH} \
go tool github.com/goreleaser/nfpm/v2/cmd/nfpm \
package \
-p rpm \
Expand Down
2 changes: 1 addition & 1 deletion containers/e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local-build:
docker build \
-t xghcr.io/goauthentik/platform-e2e:local \
--no-cache \
--build-arg="AK_PLATFORM_VER=${VERSION}+ak-${VERSION_HASH_SHORT}" \
--build-arg="AK_PLATFORM_VER=${VERSION_PKG}" \
--build-arg="AK_PLATFORM_ARCH=${ARCH}" \
-f "${PWD}/Dockerfile" \
${TOP}
Expand Down
2 changes: 1 addition & 1 deletion containers/selenium/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ci-container-tag:

.PHONY: ci-build-args
ci-build-args:
@echo AK_PLATFORM_VER=${VERSION}+ak-${VERSION_HASH_SHORT}
@echo AK_PLATFORM_VER=${VERSION_PKG}
@echo AK_DEPLOY_URL=${AK_DEPLOY_URL}

.PHONY: local-build
Expand Down
2 changes: 1 addition & 1 deletion nss/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "libnss-authentik"
arch: "${ARCH}"
platform: "linux"
version: "${VERSION}+ak-${VERSION_HASH_SHORT}"
version: "${VERSION_PKG}"
description: |
NSS module for authentik
vendor: "Authentik Security Inc."
Expand Down
2 changes: 1 addition & 1 deletion pam/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "libpam-authentik"
arch: "${ARCH}"
platform: "linux"
version: "${VERSION}+ak-${VERSION_HASH_SHORT}"
version: "${VERSION_PKG}"
description: |
libpam-authentik authenticates users through authentik.
vendor: "Authentik Security Inc."
Expand Down
2 changes: 1 addition & 1 deletion vpkg/macos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ package:
pkgbuild \
--component "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}" \
--identifier "io.goauthentik.agent" \
--version "${VERSION}.${VERSION_HASH_SHORT}" \
--version "${VERSION}" \
--scripts "${PWD}/scripts" \
--install-location /Applications \
"${TOP}/bin/${TARGET}/agent.pkg"
Expand Down
2 changes: 1 addition & 1 deletion vpkg/windows/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif
dotnet restore \
--packages "${TOP}/cache/${TARGET}" \
"${PWD}/"
ROOT=${TOP} VERSION=${VERSION} VERSION_HASH_SHORT=${VERSION_HASH_SHORT} dotnet build \
ROOT=${TOP} VERSION=${VERSION} dotnet build \
--packages "${TOP}/cache/${TARGET}" \
--artifacts-path "${TOP}/cache/${TARGET}" \
--output "${TOP}/bin/${TARGET}" \
Expand Down
2 changes: 1 addition & 1 deletion vpkg/windows/Package.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package Id="authentik.Agent"
Name="$(var.Name)"
Manufacturer="$(var.Manufacturer) ($(env.VERSION_HASH_SHORT))"
Manufacturer="$(var.Manufacturer)"
Version="$(var.Version)"
UpgradeCode="$(var.UpgradeCode)"
Compressed="true">
Expand Down
Loading