From 6a86763a9da4823458da55d5595de93dc5d8b0ae Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Wed, 18 Nov 2020 00:23:27 +0000 Subject: [PATCH] Put Release file in stable/nightly folders of APT repo --- .github/workflows/deploy.yml | 13 +++++++++++++ .github/workflows/release.yml | 13 +++++++++++++ debian/Makefile | 10 +++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0f2201f5cc..65b1c2cb4c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -86,6 +86,19 @@ jobs: SOURCE_DIR: _build/deb/apt-repo DEST_DIR: deb/dists/nightly/main/binary-all if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }} + - name: Push Release file to S3 + # Send deb file to https://ksp-ckan.s3-us-west-2.amazonaws.com/ + uses: jakejarvis/s3-sync-action@master + with: + args: --follow-symlinks + env: + AWS_S3_BUCKET: ksp-ckan + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: us-east-1 + SOURCE_DIR: _build/deb/apt-repo-rel + DEST_DIR: deb/dists/nightly + if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }} - name: Send Discord Notification env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c807892320..9fdb334d86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,6 +118,19 @@ jobs: SOURCE_DIR: _build/deb/apt-repo DEST_DIR: deb/dists/stable/main/binary-all if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }} + - name: Push Release file to S3 + # Send deb file to https://ksp-ckan.s3-us-west-2.amazonaws.com/ + uses: jakejarvis/s3-sync-action@master + with: + args: --follow-symlinks + env: + AWS_S3_BUCKET: ksp-ckan + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: us-east-1 + SOURCE_DIR: _build/deb/apt-repo-rel + DEST_DIR: deb/dists/stable + if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }} - name: Send Discord Notification env: diff --git a/debian/Makefile b/debian/Makefile index fe3100735c..79778ec4d3 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -23,13 +23,17 @@ CONSOLEUIDESKTOPSRC:=ckan-consoleui.desktop CONSOLEUIDESKTOPDEST:=$(DESTDIR)/usr/share/applications/ckan-consoleui.desktop VERSION:=$(shell egrep '^\s*\#\#\s+v.*$$' $(CHANGELOGSRC) | head -1 | sed -e 's/^\s*\#\#\s\+v//' ) DEB:=../_build/deb/ckan_$(VERSION)_all.deb + APTREPO:=../_build/deb/apt-repo REPODEB:=$(APTREPO)/ckan_$(VERSION)_all.deb PACKAGES:=$(APTREPO)/Packages.gz RELEASESRC:=Release.in RELEASEDEST:=$(APTREPO)/Release -repo: $(REPODEB) $(PACKAGES) $(RELEASEDEST) +APTREPOREL:=../_build/deb/apt-repo-rel +RELRELEASEDEST:=$(APTREPOREL)/Release + +repo: $(REPODEB) $(PACKAGES) $(RELEASEDEST) $(RELRELEASEDEST) $(REPODEB): $(DEB) umask 0022 && mkdir -p $(shell dirname $@) @@ -43,6 +47,10 @@ $(RELEASEDEST): $(RELEASESRC) umask 0022 && mkdir -p $(shell dirname $@) umask 0022 && sed -e 's/@VERSION@/$(VERSION)/' $< > $@ +$(RELRELEASEDEST): $(RELEASESRC) + umask 0022 && mkdir -p $(shell dirname $@) + umask 0022 && sed -e 's/@VERSION@/$(VERSION)/' $< > $@ + $(DEB): $(EXEDEST) $(SCRIPTDEST) $(CONTROLDEST) $(CHANGELOGDEST) $(DEBCHANGEDEST) $(MANDEST) $(ICONDEST) $(COPYRIGHTDEST) $(DESKTOPDEST) $(CONSOLEUIDESKTOPDEST) umask 0022 && mkdir -p $(shell dirname $@) fakeroot dpkg-deb --build $(DESTDIR)/ $@