Skip to content

Commit 89c8014

Browse files
committed
Initial commit
0 parents  commit 89c8014

File tree

5 files changed

+785
-0
lines changed

5 files changed

+785
-0
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
name: Compile Git Release
3+
4+
on:
5+
push:
6+
tags:
7+
- '[0-9]+.[0-9]+.[0-9]+'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
env:
15+
FORCE_COLOR: 1
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Download earthly
19+
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.22/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
20+
- name: Compile upstream git release
21+
run: earthly --use-inline-cache --save-inline-cache --strict +build --GIT_VERSION=${{github.ref_name}}
22+
- name: Upload build artifacts
23+
uses: actions/upload-artifact@v3
24+
with:
25+
name: git
26+
path: ./dist/*
27+
if-no-files-found: error
28+
- name: Compress the binaries
29+
run: cd dist && tar -czvf ../git-binaries.linux-64bit.tar.gz *
30+
- name: Release
31+
uses: ncipollo/release-action@v1
32+
with:
33+
artifacts: "git-binaries.linux-64bit.tar.gz"
34+
allowUpdates: true
35+
removeArtifacts: true
36+
artifactErrorsFailBuild: true
37+
body: statically compiled git v${{github.ref_name}} from https://github.com/git/git/releases/tag/v${{github.ref_name}}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist

Earthfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
VERSION 0.6
2+
3+
FROM alpine
4+
5+
RUN apk add --no-cache \
6+
curl autoconf gcc flex bison make bash cmake libtool musl-dev g++ \
7+
zlib-dev zlib-static \
8+
tcl tk \
9+
tcl-dev gettext
10+
11+
ARG GIT_VERSION
12+
13+
build:
14+
RUN curl -sL https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz -o git_v${GIT_VERSION}.tar.gz
15+
RUN tar zxf git_v${GIT_VERSION}.tar.gz
16+
WORKDIR /git-${GIT_VERSION}
17+
18+
RUN make configure && sed -i 's/qversion/-version/g' configure
19+
RUN ./configure prefix=/dist/git-${GIT_VERSION} LDFLAGS="--static" CFLAGS="${CFLAGS} -static" && cat config.log
20+
RUN make && make install
21+
22+
SAVE ARTIFACT /dist/git-${GIT_VERSION}/bin/* AS LOCAL ./dist/

0 commit comments

Comments
 (0)