Skip to content

Commit b3415e0

Browse files
vdyedscho
authored andcommitted
release: build unsigned Ubuntu .deb package
- include `scalar` - build & upload unsigned .deb package
1 parent e50768d commit b3415e0

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

.github/workflows/build-git-installers.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,3 +558,81 @@ jobs:
558558
name: osx-dmg
559559
path: git/.github/macos-installer/*.dmg
560560
# End build and sign Mac OSX installers
561+
562+
# Build unsigned Ubuntu package
563+
ubuntu_build:
564+
runs-on: ubuntu-18.04
565+
needs: prereqs
566+
steps:
567+
- name: Install git dependencies
568+
run: |
569+
set -ex
570+
571+
sudo apt-get update -q
572+
sudo apt-get install -y -q --no-install-recommends gettext libcurl4-gnutls-dev libpcre3-dev asciidoc xmlto
573+
- name: Clone git
574+
uses: actions/checkout@v2
575+
with:
576+
path: git
577+
- name: Build and package .deb
578+
run: |
579+
set -ex
580+
581+
die () {
582+
echo "$*" >&2
583+
exit 1
584+
}
585+
586+
echo "${{ needs.prereqs.outputs.tag_version }}" >>git/version
587+
make -C git GIT-VERSION-FILE
588+
589+
VERSION="${{ needs.prereqs.outputs.tag_version }}"
590+
591+
ARCH="$(dpkg-architecture -q DEB_HOST_ARCH)"
592+
if test -z "$ARCH"; then
593+
die "Could not determine host architecture!"
594+
fi
595+
596+
PKGNAME="microsoft-git_$VERSION"
597+
PKGDIR="$(dirname $(pwd))/$PKGNAME"
598+
599+
rm -rf "$PKGDIR"
600+
mkdir -p "$PKGDIR"
601+
602+
DESTDIR="$PKGDIR" make -C git -j5 V=1 DEVELOPER=1 \
603+
USE_LIBPCRE=1 \
604+
NO_CROSS_DIRECTORY_HARDLINKS=1 \
605+
ASCIIDOC8=1 ASCIIDOC_NO_ROFF=1 \
606+
ASCIIDOC='TZ=UTC asciidoc' \
607+
prefix=/usr/local \
608+
gitexecdir=/usr/local/lib/git-core \
609+
libexecdir=/usr/local/lib/git-core \
610+
htmldir=/usr/local/share/doc/git/html \
611+
install install-doc install-html
612+
613+
cd ..
614+
mkdir "$PKGNAME/DEBIAN"
615+
616+
# Based on https://packages.ubuntu.com/xenial/vcs/git
617+
cat >"$PKGNAME/DEBIAN/control" <<EOF
618+
Package: microsoft-git
619+
Version: $VERSION
620+
Section: vcs
621+
Priority: optional
622+
Architecture: $ARCH
623+
Depends: libcurl3-gnutls, liberror-perl, libexpat1, libpcre2-8-0, perl, perl-modules, zlib1g
624+
Maintainer: Git Fundamentals <git-fundamentals@github.com>
625+
Description: Git client built from the https://github.com/microsoft/git repository,
626+
specialized in supporting monorepo scenarios. Includes the Scalar CLI.
627+
EOF
628+
629+
dpkg-deb --build "$PKGNAME"
630+
631+
mkdir $GITHUB_WORKSPACE/artifacts
632+
mv "$PKGNAME.deb" $GITHUB_WORKSPACE/artifacts/
633+
- name: Publish unsigned .deb package
634+
uses: actions/upload-artifact@v2
635+
with:
636+
name: deb-package-unsigned
637+
path: artifacts/
638+
# End build unsigned Ubuntu package

0 commit comments

Comments
 (0)