TUN-4714: Name nightly package cloudflared-nightly to avoid apt conflict

This commit is contained in:
cthuang 2021-07-14 20:45:29 +01:00
parent a7d2de1e12
commit 6e45e0d53b
2 changed files with 19 additions and 7 deletions

View File

@ -11,6 +11,13 @@ ifneq ($(GO_BUILD_TAGS),)
GO_BUILD_TAGS := -tags $(GO_BUILD_TAGS) GO_BUILD_TAGS := -tags $(GO_BUILD_TAGS)
endif endif
ifeq ($(NIGHTLY), true)
DEB_PACKAGE_NAME := cloudflared-nightly
NIGHTLY_FLAGS := --conflicts cloudflared --replaces cloudflared
else
DEB_PACKAGE_NAME := cloudflared
endif
DATE := $(shell date -u '+%Y-%m-%d-%H%M UTC') DATE := $(shell date -u '+%Y-%m-%d-%H%M UTC')
VERSION_FLAGS := -ldflags='-X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)"' VERSION_FLAGS := -ldflags='-X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)"'
@ -138,7 +145,7 @@ define build_package
--license 'Cloudflare Service Agreement' \ --license 'Cloudflare Service Agreement' \
--url 'https://github.com/cloudflare/cloudflared' \ --url 'https://github.com/cloudflare/cloudflared' \
-m 'Cloudflare <support@cloudflare.com>' \ -m 'Cloudflare <support@cloudflare.com>' \
-a $(TARGET_ARCH) -v $(VERSION) -n cloudflared --after-install postinst.sh --after-remove postrm.sh \ -a $(TARGET_ARCH) -v $(VERSION) -n $(DEB_PACKAGE_NAME) $(NIGHTLY_FLAGS) --after-install postinst.sh --after-remove postrm.sh \
cloudflared=$(INSTALL_BINDIR) cloudflared.1=$(MAN_DIR) cloudflared=$(INSTALL_BINDIR) cloudflared.1=$(MAN_DIR)
endef endef

View File

@ -16,7 +16,7 @@ stretch: &stretch
- make cloudflared - make cloudflared
build-deb: build-deb:
build_dir: *build_dir build_dir: *build_dir
builddeps: builddeps: &build_deb_deps
- *pinned_go_fips - *pinned_go_fips
- build-essential - build-essential
- fakeroot - fakeroot
@ -26,13 +26,18 @@ stretch: &stretch
- export GOARCH=amd64 - export GOARCH=amd64
- export FIPS=true - export FIPS=true
- make cloudflared-deb - make cloudflared-deb
build-deb-nightly:
build_dir: *build_dir
builddeps: *build_deb_deps
post-cache:
- export GOOS=linux
- export GOARCH=amd64
- export FIPS=true
- export NIGHTLY=true
- make cloudflared-deb
build-deb-arm64: build-deb-arm64:
build_dir: *build_dir build_dir: *build_dir
builddeps: builddeps: *build_deb_deps
- *pinned_go
- build-essential
- fakeroot
- rubygem-fpm
post-cache: post-cache:
- export GOOS=linux - export GOOS=linux
- export GOARCH=arm64 - export GOARCH=arm64