Skip to content
Snippets Groups Projects
Commit 103b982b authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Create Debian and RedHat compatible repositories

parent 08eb27c5
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,8 @@ addons: ...@@ -4,6 +4,8 @@ addons:
apt: apt:
packages: packages:
- rpm - rpm
- createrepo
- dpkg-sig
go: go:
- '1.4' - '1.4'
env: env:
...@@ -18,7 +20,6 @@ before_deploy: ...@@ -18,7 +20,6 @@ before_deploy:
- make toolchain - make toolchain
- make build - make build
- make package - make package
- '[[ -z "$TRAVIS_TAG" ]] || make packagecloud'
deploy: deploy:
- provider: releases - provider: releases
api_key: api_key:
......
...@@ -69,15 +69,31 @@ package-deb: ...@@ -69,15 +69,31 @@ package-deb:
# Building Debian compatible packages... # Building Debian compatible packages...
make package-deb-fpm ARCH=amd64 make package-deb-fpm ARCH=amd64
make package-deb-fpm ARCH=386 make package-deb-fpm ARCH=386
# Building Debian compatible repository...
rm -f out/deb/{InRelease,Release.gpg}
cd out/deb && apt-ftparchive packages . > Packages
cd out/deb && apt-ftparchive release . > Release
gzip out/deb/Packages > Packages.gz
ifneq (,$(GPG_KEY))
gpg --clearsign -o out/deb/{InRelease,Release}
gpg -abs -o out/deb/{Release.gpg,Release}
endif
package-rpm: package-rpm:
# Building RedHat compatible packages... # Building RedHat compatible packages...
make package-rpm-fpm ARCH=amd64 make package-rpm-fpm ARCH=amd64
make package-rpm-fpm ARCH=i386
createrepo out/rpm
package-deps: package-deps:
# Installing packaging dependencies... # Installing packaging dependencies...
gem install fpm gem install fpm
ifneq (,$(GPG_KEY))
# Importing GPG key
@echo "$(GPG_KEY)" | base64 -d | gpg --allow-secret-key-import --import -
endif
package-deb-fpm: package-deb-fpm:
@mkdir -p out/deb/ @mkdir -p out/deb/
fpm -s dir -t deb -n $(NAME) -v $(VERSION) \ fpm -s dir -t deb -n $(NAME) -v $(VERSION) \
...@@ -94,6 +110,9 @@ package-deb-fpm: ...@@ -94,6 +110,9 @@ package-deb-fpm:
--vendor "ayufan.eu" \ --vendor "ayufan.eu" \
-a $(ARCH) \ -a $(ARCH) \
out/binaries/gitlab-ci-multi-runner-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner out/binaries/gitlab-ci-multi-runner-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner
ifneq (,$(GPG_KEY))
dpkg-sig --sign builder out/deb/$(NAME)_$(ARCH).deb
endif
package-rpm-fpm: package-rpm-fpm:
@mkdir -p out/rpm/ @mkdir -p out/rpm/
...@@ -108,6 +127,9 @@ package-rpm-fpm: ...@@ -108,6 +127,9 @@ package-rpm-fpm:
-m "Kamil Trzciński <ayufan@ayufan.eu>" \ -m "Kamil Trzciński <ayufan@ayufan.eu>" \
--license "MIT" \ --license "MIT" \
--vendor "ayufan.eu" \ --vendor "ayufan.eu" \
ifneq (,$(GPG_KEY))
--rpm-sign \
endif
-a $(ARCH) \ -a $(ARCH) \
out/binaries/gitlab-ci-multi-runner-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner out/binaries/gitlab-ci-multi-runner-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner
......
package commands package commands
const VERSION = "dev" const VERSION = "0.1.17-4-g0e50b6e (0e50b6e)"
const REVISION = "0e50b6e"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment