Skip to content

Commit 6771e03

Browse files
authored
Fix docker packages names (#1289)
To reflect accurately which version of gerbil is installed. This differs from just using "master".
1 parent ff6f6bf commit 6771e03

File tree

2 files changed

+15
-32
lines changed

2 files changed

+15
-32
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN case ${distro} in \
2929
eval yum install -y ${packages} \
3030
;; \
3131
fedora) \
32-
yum update -y && yum groupinstall -y 'Development Tools' && \
32+
yum update -y && yum group install -y development-tools && \
3333
eval yum install -y ${packages} \
3434
;; \
3535
debian|ubuntu) \

docker/Makefile

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
.PHONY: alpine amazonlinux debian ubuntu fedora ubuntu-current-jedi final
1+
.PHONY: alpine debian ubuntu fedora ubuntu-current-jedi final
22

33
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
44
cores := $(shell nproc)
55
arch := $(shell uname -m)
66
DEFAULT=gerbilxx
77

88
ifeq ($(BRANCH),)
9-
BRANCH := master
9+
BRANCH := $(shell git branch --show-current)
1010
endif
1111

12+
TAG := $(shell git describe --tags)
13+
1214
ifeq ($(REPO),)
13-
REPO := mighty-gerbils/gerbil
15+
REPO := $(shell git remote get-url $(shell git rev-parse --abbrev-ref --symbolic-full-name @{u}|cut -f1 -d/)|cut -f2 -d:)
1416
endif
1517

1618
cores := $(shell nproc)
19+
1720
$(info the branch is $(BRANCH) and the repo is $(REPO) cores are: $(cores))
1821

1922
alpine_packages := autoconf \
@@ -119,6 +122,10 @@ debian_packages := autoconf \
119122
texinfo \
120123
zlib1g-dev
121124

125+
debug:
126+
$(info the branch is $(BRANCH) and the repo is $(REPO) cores are: $(cores))
127+
128+
122129
gerbilxx:
123130
docker build --target final \
124131
--rm=true --no-cache \
@@ -146,20 +153,6 @@ gerbil:
146153
-t final $(ROOT_DIR)
147154
docker tag final gerbil/gerbil:$(arch)-$(BRANCH)
148155

149-
amazonlinux:
150-
docker build --target final \
151-
--rm=true --no-cache \
152-
--build-arg branch="$(BRANCH)" \
153-
--build-arg configure_args="--enable-march=" \
154-
--build-arg cores=$(cores) \
155-
--build-arg distro="amazonlinux" \
156-
--build-arg packages="$(amazon_packages)" \
157-
--build-arg repo="$(REPO)" \
158-
--build-arg shared="no" \
159-
--build-arg with_db="YES" \
160-
-t final $(ROOT_DIR)
161-
docker tag final gerbil/amazonlinux:$(arch)-$(BRANCH)
162-
163156
centos:
164157
docker build --target final \
165158
--rm=true --no-cache \
@@ -222,7 +215,7 @@ ubuntu-current-jedi:
222215
package-ubuntu:
223216
docker run -v $(ROOT_DIR):/src:z -t gerbil/ubuntu:$(arch)-$(BRANCH) \
224217
bash -c "gem install fpm && \
225-
fpm -f -s dir -p /src/ -t deb -n gerbil-$(BRANCH).ubuntu \
218+
fpm -f -s dir -p /src/ -t deb -n gerbil-scheme.ubuntu -v $(TAG) \
226219
-d libsqlite3-dev -d libssl-dev \
227220
--description 'Gerbil Scheme Package' /opt/gerbil"
228221

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

242-
package-amazonlinux:
243-
docker run -v $(ROOT_DIR):/src:z -t gerbil/amazonlinux:$(arch)-$(BRANCH) \
244-
bash -c "amazon-linux-extras install -y ruby2.6 && \
245-
yum install -y ruby-devel rubygems rpm-build && \
246-
gem install fpm && \
247-
fpm -s dir -p /src/ -t rpm \
248-
-n gerbil-$(BRANCH).amazonlinux \
249-
--description 'Gerbil Package' /opt/gerbil"
250-
251235
packages: package-ubuntu package-fedora
252236

253237
push-all:
254238
docker push gerbil/alpine
255239
docker push gerbil/ubuntu
256240
docker push gerbil/fedora
257-
docker push gerbil/amazonlinux
258241

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

262-
all: alpine amazonlinux fedora ubuntu
245+
all: alpine fedora ubuntu
263246

264247
docker: ubuntu

0 commit comments

Comments
 (0)