Skip to content

Commit c22dc5a

Browse files
committed
ci: Refactor multiplatform container image build
Required because currently build-dist.py fails if no version is set.
1 parent 47d75e7 commit c22dc5a

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG TARGETARCH
55

66
WORKDIR /app
77

8-
COPY dist/token2go-server-${TARGETOS}-${TARGETARCH} /app/token2go-server
8+
COPY dist/*-${TARGETOS}-${TARGETARCH}/token2go-server* /app/token2go-server
99

1010
EXPOSE 8080
1111

scripts/build-dist.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ def sha256sum(file):
9797

9898
subprocess.run(["go", "build", "-o", bin_path, "-ldflags", ldflags], env=os.environ)
9999

100-
# Copy bin to make Docker easier.
101-
shutil.copy(bin_path, join(dist_dir, f"{name}-{pf.os}-{pf.arch}"))
102-
103100
# Include other files.
104101
if isfile("LICENSE"):
105102
shutil.copy("LICENSE", odir_path)
@@ -122,9 +119,6 @@ def sha256sum(file):
122119
for f in files:
123120
archive.add(join(root, f), arcname=basename(f))
124121

125-
# Delete output directory. Not required from here.
126-
shutil.rmtree(odir_path)
127-
128122
# Add sha256sum type of checksum string to txt file.
129123
with open(join(dist_dir, "sha256sums.txt"), "a") as f:
130124
f.write(sha256sum(join(dist_dir, odir_name + arc_ext)) + "\n")

0 commit comments

Comments
 (0)