From 3b432160db45b16dae745499ef11267c649d700d Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Mon, 24 May 2021 22:42:07 -0700 Subject: [PATCH] build: Add license gen to source archive script --- build.sh | 6 +++++- scripts/archive-source.sh | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 8ee8ce7bff..814a5be6a3 100755 --- a/build.sh +++ b/build.sh @@ -96,7 +96,11 @@ package_linux() { mkdir -p dist cp build/qemu-system-i386 dist/xemu # cp -r "${project_source_dir}/data" dist - python3 ./scripts/gen-license.py > dist/LICENSE.txt + if test -e "${project_source_dir}/XEMU_LICENSE"; then + cp "${project_source_dir}/XEMU_LICENSE" dist/LICENSE.txt + else + python3 ./scripts/gen-license.py > dist/LICENSE.txt + fi } postbuild='' diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 63b0de9619..16331c8168 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -72,9 +72,10 @@ for sm in $submodules; do test $? -ne 0 && error "failed append submodule $sm to $tar_file" done +python3 ./scripts/gen-license.py > XEMU_LICENSE git rev-parse HEAD 2>/dev/null | tr -d '\n' > XEMU_COMMIT git symbolic-ref --short HEAD > XEMU_BRANCH git describe --match 'xemu-v*' | cut -c 7- | tr -d '\n' > XEMU_VERSION -tar -r --file "$tar_file" XEMU_COMMIT XEMU_BRANCH XEMU_VERSION +tar -r --file "$tar_file" XEMU_COMMIT XEMU_BRANCH XEMU_VERSION XEMU_LICENSE exit 0