@@ -296,3 +296,81 @@ jobs:
296
296
name : osx-installer
297
297
path : artifacts
298
298
# End build Mac OSX installers
299
+
300
+ # Build unsigned Ubuntu package
301
+ ubuntu_build :
302
+ runs-on : ubuntu-latest
303
+ needs : prereqs
304
+ steps :
305
+ - name : Install git dependencies
306
+ run : |
307
+ set -ex
308
+
309
+ sudo apt-get update -q
310
+ sudo apt-get install -y -q --no-install-recommends gettext libcurl4-gnutls-dev libpcre3-dev asciidoc xmlto
311
+ - name : Clone git
312
+ uses : actions/checkout@v2
313
+ with :
314
+ path : git
315
+ - name : Build and package .deb
316
+ run : |
317
+ set -ex
318
+
319
+ die () {
320
+ echo "$*" >&2
321
+ exit 1
322
+ }
323
+
324
+ echo "${{ needs.prereqs.outputs.tag_version }}" >>git/version
325
+ make -C git GIT-VERSION-FILE
326
+
327
+ VERSION="${{ needs.prereqs.outputs.tag_version }}"
328
+
329
+ ARCH="$(dpkg-architecture -q DEB_HOST_ARCH)"
330
+ if test -z "$ARCH"; then
331
+ die "Could not determine host architecture!"
332
+ fi
333
+
334
+ PKGNAME="microsoft-git_$VERSION"
335
+ PKGDIR="$(dirname $(pwd))/$PKGNAME"
336
+
337
+ rm -rf "$PKGDIR"
338
+ mkdir -p "$PKGDIR"
339
+
340
+ DESTDIR="$PKGDIR" make -C git -j5 V=1 DEVELOPER=1 \
341
+ USE_LIBPCRE=1 \
342
+ NO_CROSS_DIRECTORY_HARDLINKS=1 \
343
+ ASCIIDOC8=1 ASCIIDOC_NO_ROFF=1 \
344
+ ASCIIDOC='TZ=UTC asciidoc' \
345
+ prefix=/usr/local \
346
+ gitexecdir=/usr/local/lib/git-core \
347
+ libexecdir=/usr/local/lib/git-core \
348
+ htmldir=/usr/local/share/doc/git/html \
349
+ install install-doc install-html
350
+
351
+ cd ..
352
+ mkdir "$PKGNAME/DEBIAN"
353
+
354
+ # Based on https://packages.ubuntu.com/xenial/vcs/git
355
+ cat >"$PKGNAME/DEBIAN/control" <<EOF
356
+ Package: microsoft-git
357
+ Version: $VERSION
358
+ Section: vcs
359
+ Priority: optional
360
+ Architecture: $ARCH
361
+ Depends: libcurl3-gnutls, liberror-perl, libexpat1, libpcre2-8-0, perl, perl-modules, zlib1g
362
+ Maintainer: Git Fundamentals <[email protected] >
363
+ Description: Git client built from the https://github.com/microsoft/git repository,
364
+ specialized in supporting monorepo scenarios. Includes the Scalar CLI.
365
+ EOF
366
+
367
+ dpkg-deb --build "$PKGNAME"
368
+
369
+ mkdir $GITHUB_WORKSPACE/artifacts
370
+ mv "$PKGNAME.deb" $GITHUB_WORKSPACE/artifacts/
371
+ - name : Publish unsigned .deb package
372
+ uses : actions/upload-artifact@v2
373
+ with :
374
+ name : deb-package-unsigned
375
+ path : artifacts/
376
+ # End build unsigned Ubuntu package
0 commit comments