chore: parallel makefile attempt 3 (#3926)

* Revert "chore: Revert parallel Makefile builds (#3918)"

This reverts commit b077f71015.

* fix: fix release workflow with parallel makefile

* fix: mark generated files as fresh during releases
This commit is contained in:
Dean Sheather
2022-09-08 02:40:17 +10:00
committed by GitHub
parent 3d6d51fbd0
commit 819622182b
19 changed files with 589 additions and 753 deletions

View File

@ -3,7 +3,7 @@
# This script creates an archive containing the given binary renamed to
# `coder(.exe)?`, as well as the README.md and LICENSE files from the repo root.
#
# Usage: ./archive.sh --format tar.gz [--output path/to/output.tar.gz] [--sign-darwin] [--agpl] path/to/binary
# Usage: ./archive.sh --format tar.gz --os linux/darwin/windows [--output path/to/output.tar.gz] [--sign-darwin] [--agpl] path/to/binary
#
# The --format parameter must be set, and must either be "zip" or "tar.gz".
#
@ -14,9 +14,10 @@
# utility and then notarized using the `gon` utility, which may take a while.
# $AC_APPLICATION_IDENTITY must be set and the signing certificate must be
# imported for this to work. Also, the input binary must already be signed with
# the `codesign` tool.=
# the `codesign` tool.
#
# If the --agpl parameter is specified, only includes AGPL license.
# If the --agpl parameter is specified, only the AGPL license is included in the
# outputted archive.
#
# The absolute output path is printed on success.
@ -26,10 +27,11 @@ source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
format=""
output_path=""
sign_darwin=0
sign_darwin="${CODER_SIGN_DARWIN:-0}"
os=""
agpl="${CODER_BUILD_AGPL:-0}"
args="$(getopt -o "" -l format:,output:,sign-darwin,agpl -- "$@")"
args="$(getopt -o "" -l format:,output:,sign-darwin,os:,agpl -- "$@")"
eval set -- "$args"
while true; do
case "$1" in
@ -46,10 +48,11 @@ while true; do
output_path="$(realpath "$2")"
shift 2
;;
--os)
os="$2"
shift 2
;;
--sign-darwin)
if [[ "${AC_APPLICATION_IDENTITY:-}" == "" ]]; then
error "AC_APPLICATION_IDENTITY must be set when --sign-darwin is supplied"
fi
sign_darwin=1
shift
;;
@ -79,6 +82,11 @@ if [[ ! -f "$1" ]]; then
fi
input_file="$(realpath "$1")"
sign_darwin="$([[ "$sign_darwin" == 1 ]] && [[ "$os" == "darwin" ]] && echo 1 || echo 0)"
if [[ "$sign_darwin" == 1 ]] && [[ "${AC_APPLICATION_IDENTITY:-}" == "" ]]; then
error "AC_APPLICATION_IDENTITY must be set when --sign-darwin or CODER_SIGN_DARWIN=1 is supplied"
fi
# Check dependencies
if [[ "$format" == "zip" ]]; then
dependencies zip