Skip to content

Commit

Permalink
Merge #3202 Put .deb file in root of APT repo
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Nov 18, 2020
2 parents 80adb33 + b94483b commit ca253b8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,10 @@ jobs:
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
DEST_DIR: deb/dists/nightly/main/binary-all
SOURCE_DIR: _build/deb/apt-repo-root
DEST_DIR: deb
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
Expand All @@ -96,7 +95,7 @@ jobs:
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
SOURCE_DIR: _build/deb/apt-repo-dist
DEST_DIR: deb/dists/nightly
if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }}

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,10 @@ jobs:
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
DEST_DIR: deb/dists/stable/main/binary-all
SOURCE_DIR: _build/deb/apt-repo-root
DEST_DIR: deb
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
Expand All @@ -128,7 +127,7 @@ jobs:
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
SOURCE_DIR: _build/deb/apt-repo-dist
DEST_DIR: deb/dists/stable
if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }}

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file.
### Features

- [Multiple] Allow upgrading manually installed modules (#3190 by: HebaruSan; reviewed: DasSkelett)
- [Build] Generate APT repo for releases and under dev builds (#3197, #3201 by: HebaruSan; reviewed: DasSkelett)
- [Build] Generate APT repo for releases and under dev builds (#3197, #3201, #3202 by: HebaruSan; reviewed: DasSkelett)

### Bugfixes

Expand Down
30 changes: 17 additions & 13 deletions debian/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,36 @@ 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
# Files for /deb/ (the .deb file)
APT_REPO_ROOT:=../_build/deb/apt-repo-root
REPODEB:=$(APT_REPO_ROOT)/ckan_$(VERSION)_all.deb

# Files for /deb/dists/{stable,nightly}/
# (Release, main/binary-all/Release, main/binary-all/Packages.gz,
# actual path to be determined by yml files)
APT_REPO_DIST:=../_build/deb/apt-repo-dist
RELEASESRC:=Release.in
RELEASEDEST:=$(APTREPO)/Release
DISTRELEASEDEST:=$(APT_REPO_DIST)/Release
ARCHRELEASEDEST:=$(APT_REPO_DIST)/main/binary-all/Release
PACKAGES:=$(APT_REPO_DIST)/main/binary-all/Packages.gz

APTREPOREL:=../_build/deb/apt-repo-rel
RELRELEASEDEST:=$(APTREPOREL)/Release

repo: $(REPODEB) $(PACKAGES) $(RELEASEDEST) $(RELRELEASEDEST)
repo: $(REPODEB) $(DISTRELEASEDEST) $(ARCHRELEASEDEST) $(PACKAGES)

$(REPODEB): $(DEB)
umask 0022 && mkdir -p $(shell dirname $@)
umask 0022 && cp $< $@

$(PACKAGES): $(REPODEB)
$(DISTRELEASEDEST): $(RELEASESRC)
umask 0022 && mkdir -p $(shell dirname $@)
umask 0022 && (cd $(shell dirname $<) && dpkg-scanpackages -m .) | gzip -c > $@
umask 0022 && sed -e 's/@VERSION@/$(VERSION)/' $< > $@

$(RELEASEDEST): $(RELEASESRC)
$(ARCHRELEASEDEST): $(RELEASESRC)
umask 0022 && mkdir -p $(shell dirname $@)
umask 0022 && sed -e 's/@VERSION@/$(VERSION)/' $< > $@

$(RELRELEASEDEST): $(RELEASESRC)
$(PACKAGES): $(REPODEB)
umask 0022 && mkdir -p $(shell dirname $@)
umask 0022 && sed -e 's/@VERSION@/$(VERSION)/' $< > $@
umask 0022 && (cd $(shell dirname $<) && dpkg-scanpackages -m .) | gzip -c > $@

$(DEB): $(EXEDEST) $(SCRIPTDEST) $(CONTROLDEST) $(CHANGELOGDEST) $(DEBCHANGEDEST) $(MANDEST) $(ICONDEST) $(COPYRIGHTDEST) $(DESKTOPDEST) $(CONSOLEUIDESKTOPDEST)
umask 0022 && mkdir -p $(shell dirname $@)
Expand Down

0 comments on commit ca253b8

Please sign in to comment.