Skip to content

Commit

Permalink
Fix docker packages names (#1289)
Browse files Browse the repository at this point in the history
To reflect accurately which version of gerbil is installed. This differs
from just using "master".
  • Loading branch information
ober authored Dec 26, 2024
1 parent ff6f6bf commit 6771e03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 32 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN case ${distro} in \
eval yum install -y ${packages} \
;; \
fedora) \
yum update -y && yum groupinstall -y 'Development Tools' && \
yum update -y && yum group install -y development-tools && \
eval yum install -y ${packages} \
;; \
debian|ubuntu) \
Expand Down
45 changes: 14 additions & 31 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
.PHONY: alpine amazonlinux debian ubuntu fedora ubuntu-current-jedi final
.PHONY: alpine debian ubuntu fedora ubuntu-current-jedi final

ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
cores := $(shell nproc)
arch := $(shell uname -m)
DEFAULT=gerbilxx

ifeq ($(BRANCH),)
BRANCH := master
BRANCH := $(shell git branch --show-current)
endif

TAG := $(shell git describe --tags)

ifeq ($(REPO),)
REPO := mighty-gerbils/gerbil
REPO := $(shell git remote get-url $(shell git rev-parse --abbrev-ref --symbolic-full-name @{u}|cut -f1 -d/)|cut -f2 -d:)
endif

cores := $(shell nproc)

$(info the branch is $(BRANCH) and the repo is $(REPO) cores are: $(cores))

alpine_packages := autoconf \
Expand Down Expand Up @@ -119,6 +122,10 @@ debian_packages := autoconf \
texinfo \
zlib1g-dev

debug:
$(info the branch is $(BRANCH) and the repo is $(REPO) cores are: $(cores))


gerbilxx:
docker build --target final \
--rm=true --no-cache \
Expand Down Expand Up @@ -146,20 +153,6 @@ gerbil:
-t final $(ROOT_DIR)
docker tag final gerbil/gerbil:$(arch)-$(BRANCH)

amazonlinux:
docker build --target final \
--rm=true --no-cache \
--build-arg branch="$(BRANCH)" \
--build-arg configure_args="--enable-march=" \
--build-arg cores=$(cores) \
--build-arg distro="amazonlinux" \
--build-arg packages="$(amazon_packages)" \
--build-arg repo="$(REPO)" \
--build-arg shared="no" \
--build-arg with_db="YES" \
-t final $(ROOT_DIR)
docker tag final gerbil/amazonlinux:$(arch)-$(BRANCH)

centos:
docker build --target final \
--rm=true --no-cache \
Expand Down Expand Up @@ -222,7 +215,7 @@ ubuntu-current-jedi:
package-ubuntu:
docker run -v $(ROOT_DIR):/src:z -t gerbil/ubuntu:$(arch)-$(BRANCH) \
bash -c "gem install fpm && \
fpm -f -s dir -p /src/ -t deb -n gerbil-$(BRANCH).ubuntu \
fpm -f -s dir -p /src/ -t deb -n gerbil-scheme.ubuntu -v $(TAG) \
-d libsqlite3-dev -d libssl-dev \
--description 'Gerbil Scheme Package' /opt/gerbil"

Expand All @@ -235,30 +228,20 @@ package-fedora:
bash -c "yum install -y rubygems ruby-devel rpm-build && \
gem install fpm && \
fpm -f -s dir -p /src/ -t rpm \
-n gerbil-$(BRANCH).fedora \
-d zlib-devel -d zlib-static -d openssl-devel -d sqlite-devel \
-n gerbil-$(BRANCH).fedora -v $(TAG) \
-d zlib-devel -d zlib-static -d openssl-devel -d sqlite-devel \
--description 'Gerbil Scheme Package' /opt/gerbil"

package-amazonlinux:
docker run -v $(ROOT_DIR):/src:z -t gerbil/amazonlinux:$(arch)-$(BRANCH) \
bash -c "amazon-linux-extras install -y ruby2.6 && \
yum install -y ruby-devel rubygems rpm-build && \
gem install fpm && \
fpm -s dir -p /src/ -t rpm \
-n gerbil-$(BRANCH).amazonlinux \
--description 'Gerbil Package' /opt/gerbil"

packages: package-ubuntu package-fedora

push-all:
docker push gerbil/alpine
docker push gerbil/ubuntu
docker push gerbil/fedora
docker push gerbil/amazonlinux

manifest:
docker manifest create gerbil/alpine:latest --amend gerbil/alpine:aarch64 --amend gerbil/alpine:x86_64

all: alpine amazonlinux fedora ubuntu
all: alpine fedora ubuntu

docker: ubuntu

0 comments on commit 6771e03

Please sign in to comment.