File tree Expand file tree Collapse file tree 4 files changed +28
-15
lines changed Expand file tree Collapse file tree 4 files changed +28
-15
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ BUILDIMG:=docker-credential-secretservice-$(VERSION)
79
79
deb :
80
80
mkdir -p release
81
81
docker build -f deb/Dockerfile \
82
- --build-arg VERSION=$(VERSION ) \
83
- --build-arg DISTRO=xenial \
82
+ --build-arg VERSION=$(patsubst v % , % , $( VERSION ) ) \
83
+ --build-arg REVISION= $( REVISION ) \
84
84
--tag $(BUILDIMG ) \
85
85
.
86
86
docker run --rm --net=none $(BUILDIMG ) tar cf - /release | tar xf -
Original file line number Diff line number Diff line change 1
- FROM ubuntu:xenial
1
+ ARG GO_VERSION=1.18.5
2
+ ARG DISTRO=ubuntu
3
+ ARG SUITE=focal
2
4
3
- ARG VERSION
4
- ARG DISTRO
5
+ FROM golang:${GO_VERSION}-buster AS golang
6
+
7
+ FROM ${DISTRO}:${SUITE}
5
8
6
- RUN apt-get update && apt-get install -yy debhelper dh-make golang-go libsecret-1-dev
9
+ ARG DEBIAN_FRONTEND=noninteractive
10
+ RUN apt-get update && apt-get install -yy debhelper dh-make libsecret-1-dev
7
11
RUN mkdir -p /build
8
12
9
13
WORKDIR /build
10
- ENV GOPATH /build
14
+ ENV GOPROXY=https://proxy.golang.org|direct
15
+ ENV GO111MODULE=off
16
+ ENV GOPATH=/build
17
+ ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
18
+ COPY --from=golang /usr/local/go /usr/local/go
11
19
12
20
COPY Makefile .
13
21
COPY credentials credentials
@@ -16,4 +24,12 @@ COPY pass pass
16
24
COPY deb/debian ./debian
17
25
COPY deb/build-deb .
18
26
19
- RUN /build/build-deb ${VERSION} ${DISTRO}
27
+ ARG VERSION
28
+ ENV VERSION=${VERSION}
29
+ ARG REVISION
30
+ ENV REVISION=${REVISION}
31
+ ARG DISTRO
32
+ ENV DISTRO=${DISTRO}
33
+ ARG SUITE
34
+ ENV SUITE=${SUITE}
35
+ RUN /build/build-deb
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
- set -x
3
- set -e
4
-
5
- version=$1
6
- distro=$2
2
+ set -ex
7
3
8
4
maintainer=$( awk -F ' : ' ' $1 == "Maintainer" { print $2; exit }' debian/control)
9
5
10
6
cat > " debian/changelog" << -EOF
11
- docker-credential-helpers ($version ) $DISTRO ; urgency=low
7
+ docker-credential-helpers ($VERSION ) $DISTRO - $SUITE ; urgency=low
12
8
13
9
* New upstream version
14
10
Original file line number Diff line number Diff line change 3
3
DESTDIR := $(CURDIR ) /debian/tmp
4
4
5
5
override_dh_auto_build :
6
- make secretservice pass
6
+ make build-secretservice DESTDIR=bin
7
+ make build-pass DESTDIR=bin
7
8
8
9
override_dh_auto_install :
9
10
install -D bin/docker-credential-secretservice $(DESTDIR ) /usr/bin/docker-credential-secretservice
You can’t perform that action at this time.
0 commit comments