Consolidate dedicated server release notices

Source licenses, attribution, provenance, and font notices from the pinned game checkout while retaining installer compatibility with earlier manifest formats.
This commit is contained in:
Alexander Sellite 2026-08-12 22:12:16 -04:00
parent 0f1d931a7b
commit 220cfd2354
8 changed files with 92 additions and 421 deletions

View file

@ -1,14 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -ne 3 ]]; then
echo "Usage: $0 /path/to/server-linux-x86_64 GAME_VERSION GAME_COMMIT" >&2
if [[ $# -ne 4 ]]; then
echo "Usage: $0 /path/to/server-linux-x86_64 GAME_VERSION GAME_COMMIT /path/to/netfishing" >&2
exit 2
fi
source_dir="${1%/}"
game_version="$2"
game_commit="${3,,}"
game_repository="${4%/}"
repository_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
destination_dir="${repository_dir}/dist"
licenses_dir="${destination_dir}/licenses"
@ -28,6 +29,20 @@ if [[ ! "${game_commit}" =~ ^[0-9a-f]{40}$ ]]; then
echo "GAME_COMMIT must be the full 40-character Git commit." >&2
exit 2
fi
if [[ ! -f "${game_repository}/project.godot" ]]; then
echo "The NETfishing game repository was not found: ${game_repository}" >&2
exit 2
fi
resolved_game_commit="$(git -C "${game_repository}" rev-parse HEAD)"
if [[ "${resolved_game_commit}" != "${game_commit}" ]]; then
echo "The NETfishing repository HEAD does not match GAME_COMMIT." >&2
exit 2
fi
if ! git -C "${game_repository}" diff --quiet \
|| ! git -C "${game_repository}" diff --cached --quiet; then
echo "The NETfishing repository must be clean before staging notices." >&2
exit 1
fi
if [[ ! "${packaging_commit}" =~ ^[0-9a-f]{40}$ ]]; then
echo "Could not resolve the dedicated packaging Git commit." >&2
exit 2
@ -40,22 +55,25 @@ for filename in NETfishingServer.x86_64 NETfishingServer.pck; do
fi
done
install -d -m 0755 "${destination_dir}"
install -m 0755 "${source_dir}/NETfishingServer.x86_64" \
"${destination_dir}/NETfishingServer.x86_64"
install -m 0644 "${source_dir}/NETfishingServer.pck" \
"${destination_dir}/NETfishingServer.pck"
rm -rf -- "${licenses_dir}"
install -d -m 0755 "${licenses_dir}"
install -m 0644 "${repository_dir}/LICENSE" \
install -m 0644 "${game_repository}/LICENSE" \
"${licenses_dir}/GPL-3.0-or-later.txt"
install -m 0644 "${repository_dir}/ASSET-LICENSE.md" \
install -m 0644 "${game_repository}/ASSET-LICENSE.md" \
"${licenses_dir}/ASSET-LICENSE.md"
install -m 0644 "${repository_dir}/THIRD-PARTY-NOTICES.md" \
"${licenses_dir}/THIRD-PARTY-NOTICES.md"
install -m 0644 "${repository_dir}/TRADEMARKS.md" \
install -m 0644 "${game_repository}/docs/ATTRIBUTION.md" \
"${licenses_dir}/ATTRIBUTION.md"
install -m 0644 "${game_repository}/TRADEMARKS.md" \
"${licenses_dir}/TRADEMARKS.md"
install -m 0644 "${repository_dir}/CREDITS.md" \
"${licenses_dir}/CREDITS.md"
install -m 0644 "${game_repository}/ui/fonts/Tuffy-LICENSE.txt" \
"${licenses_dir}/Tuffy-LICENSE.txt"
install -m 0644 "${game_repository}/ui/fonts/Seattle-Avenue-LICENSE.txt" \
"${licenses_dir}/Seattle-Avenue-LICENSE.txt"
cd -- "${destination_dir}"
executable_sha256="$(sha256sum NETfishingServer.x86_64 | awk '{print $1}')"
@ -64,7 +82,7 @@ pck_sha256="$(sha256sum NETfishingServer.pck | awk '{print $1}')"
apply_umask="$(umask)"
umask 022
printf '%s\n' \
"manifest_version=2" \
"manifest_version=3" \
"game_version=${game_version}" \
"game_commit=${game_commit}" \
"packaging_commit=${packaging_commit}" \
@ -93,8 +111,9 @@ sha256sum \
SOURCE-CODE.md \
licenses/GPL-3.0-or-later.txt \
licenses/ASSET-LICENSE.md \
licenses/THIRD-PARTY-NOTICES.md \
licenses/ATTRIBUTION.md \
licenses/TRADEMARKS.md \
licenses/CREDITS.md \
licenses/Tuffy-LICENSE.txt \
licenses/Seattle-Avenue-LICENSE.txt \
> SHA256SUMS
echo "Staged dedicated server build in ${destination_dir}"