diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index f0e79b31926149..ea098b47a47807 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -295,23 +295,72 @@ extends: artifactName: '${{ dim.id }}' steps: - checkout: self - # TODO: add tasks to set up build environment - # TODO: add tasks to build Git and installers - - script: | - echo $(cc_arch) - echo $(deb_arch) - mkdir -p $(Build.ArtifactStagingDirectory)/app - debroot=$(Build.ArtifactStagingDirectory)/pkgroot - mkdir -p $debroot/DEBIAN - cat > $debroot/DEBIAN/control <version + make GIT-VERSION-FILE + + PKGNAME="microsoft-git_${VERSION}_$(deb_arch)" + PKGDIR="$(Build.ArtifactStagingDirectory)/pkgroot" + rm -rf "$PKGDIR" + mkdir -p "$PKGDIR/DEBIAN" + + DESTDIR="$PKGDIR" make -j"$(nproc)" V=1 DEVELOPER=1 \ + USE_LIBPCRE=1 \ + USE_CURL_FOR_IMAP_SEND=1 NO_OPENSSL=1 \ + NO_CROSS_DIRECTORY_HARDLINKS=1 \ + ASCIIDOC8=1 ASCIIDOC_NO_ROFF=1 \ + ASCIIDOC='TZ=UTC asciidoc' \ + prefix=/usr/local \ + gitexecdir=/usr/local/lib/git-core \ + libexecdir=/usr/local/lib/git-core \ + htmldir=/usr/local/share/doc/git/html \ + install install-doc install-html + + # Based on https://packages.ubuntu.com/xenial/vcs/git + cat >"$PKGDIR/DEBIAN/control" < + Description: Git client built from the https://github.com/microsoft/git repository, + specialized in supporting monorepo scenarios. Includes the Scalar CLI. + CTRL + + mkdir -p "$(Build.ArtifactStagingDirectory)/app" + dpkg-deb -Zxz --build "$PKGDIR" \ + "$(Build.ArtifactStagingDirectory)/app/$PKGNAME.deb" - ${{ if eq(parameters.esrp, true) }}: # ESRP ADO tasks require .NET, so we install it here since the # Linux images do not have it by default. @@ -335,11 +384,15 @@ extends: "Parameters": {} } ] - # TODO: put final artifacts under $(Build.ArtifactStagingDirectory)/_final - - script: | - mkdir -p $(Build.ArtifactStagingDirectory)/_final - cp -R $(Build.ArtifactStagingDirectory)/app/* $(Build.ArtifactStagingDirectory)/_final/ - displayName: 'Dummy collect artifacts' + - task: Bash@3 + displayName: 'Stage Debian package for upload' + inputs: + targetType: inline + script: | + set -euo pipefail + mkdir -p "$(Build.ArtifactStagingDirectory)/_final" + mv "$(Build.ArtifactStagingDirectory)/app/microsoft-git_$(git_version)_$(deb_arch).deb" \ + "$(Build.ArtifactStagingDirectory)/_final/" - stage: release displayName: 'Release'