-
Notifications
You must be signed in to change notification settings - Fork 8
/
Earthfile
73 lines (64 loc) · 2.06 KB
/
Earthfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
VERSION 0.8
haxe-dockerfiles:
FROM haxe:4.3
WORKDIR /workspace
COPY Dockerfile-*.template .
COPY Update.hx update.hxml .
RUN haxe update.hxml
SAVE ARTIFACT --keep-ts [0-9].[0-9] AS LOCAL .
# https://github.com/docker-library/bashbrew
haxe-stackbrew-library:
FROM haxe:4.3
WORKDIR /workspace
COPY .git .
COPY GenerateStackbrewLibrary.hx Update.hx generate-stackbrew-library.hxml .
RUN haxe generate-stackbrew-library.hxml
SAVE ARTIFACT --keep-ts haxe AS LOCAL .
haxe-image:
ARG --required VERSION
ARG --required VARIANT
FROM DOCKERFILE +haxe-dockerfiles/$VERSION/$VARIANT
SAVE IMAGE "haxe:$VERSION-$VARIANT"
haxe-images:
FROM +haxe-dockerfiles
ARG VERSION="$(ls -d */ | sed -e 's/\/$//')"
FOR VERSION IN $VERSION
ARG VARIANT="$(ls \"$VERSION\" --ignore=\"windowsservercore-*\")"
FOR VARIANT IN $VARIANT
IF [ -d "$VERSION/$VARIANT" ]
BUILD +haxe-image --VERSION="$VERSION" --VARIANT="$VARIANT"
END
END
END
haxe-sha256-win:
FROM haxe:4.3
WORKDIR /workspace
COPY Update.hx update.hxml .
ARG --required VERSION
RUN wget "$(haxe update.hxml getHaxeFileUrl $VERSION WindowsServerCore)"
RUN --no-cache sha256sum *.zip
github-src:
FROM buildpack-deps:focal-curl
ARG --required REPO
ARG --required COMMIT
ARG DIR=/src
WORKDIR $DIR
RUN curl -fsSL "https://github.com/${REPO}/archive/${COMMIT}.tar.gz" | tar xz --strip-components=1 -C "$DIR"
SAVE ARTIFACT "$DIR"
bashbrew-src:
FROM +github-src --REPO="docker-library/bashbrew" --COMMIT="22e529f066b4bee5c6141f53c1059877b386bdbe" --DIR=/bashbrew
SAVE ARTIFACT /bashbrew
bashbrew:
FROM golang:1.17
COPY +bashbrew-src/bashbrew /bashbrew
WORKDIR /bashbrew
RUN go mod download
RUN ./bashbrew.sh --version
SAVE ARTIFACT bin/bashbrew
bashbrew-ls-haxe:
FROM ubuntu:focal
WORKDIR /workspace
COPY +bashbrew/* /usr/local/bin/
COPY +haxe-stackbrew-library/haxe library/haxe
ENV BASHBREW_LIBRARY=library
RUN bashbrew ls haxe