Rebrand dedicated server as straywild
This commit is contained in:
parent
481997b42c
commit
c1b228475d
14 changed files with 132 additions and 132 deletions
|
|
@ -12,15 +12,15 @@ fi
|
|||
|
||||
archive_path="$(readlink -f -- "$1")"
|
||||
checksum_input="$2"
|
||||
install_root="${NETFISHING_INSTALL_ROOT:-/opt/netfishing-server}"
|
||||
service_name="${NETFISHING_SERVICE_NAME:-netfishing-server.service}"
|
||||
install_root="${straywild_INSTALL_ROOT:-/opt/straywild-server}"
|
||||
service_name="${straywild_SERVICE_NAME:-straywild-server.service}"
|
||||
|
||||
if [[ ! -f "${archive_path}" ]]; then
|
||||
echo "Archive not found: $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${install_root}" != /* || "${install_root}" == "/" ]]; then
|
||||
echo "NETFISHING_INSTALL_ROOT must be a specific absolute directory." >&2
|
||||
echo "straywild_INSTALL_ROOT must be a specific absolute directory." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ if [[ "${actual_sha256}" != "${expected_sha256}" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
work_dir="$(mktemp -d /tmp/netfishing-server-install.XXXXXX)"
|
||||
work_dir="$(mktemp -d /tmp/straywild-server-install.XXXXXX)"
|
||||
release_stage=""
|
||||
cleanup() {
|
||||
if [[ -n "${release_stage}" && -d "${release_stage}" ]]; then
|
||||
|
|
@ -85,7 +85,7 @@ if [[ -n "$(find "${payload_dir}" -type l -print -quit)" ]]; then
|
|||
echo "Archive payload may not contain symbolic links." >&2
|
||||
exit 1
|
||||
fi
|
||||
for filename in NETfishingServer.x86_64 NETfishingServer.pck BUILD_INFO SHA256SUMS; do
|
||||
for filename in straywildServer.x86_64 straywildServer.pck BUILD_INFO SHA256SUMS; do
|
||||
if [[ ! -f "${payload_dir}/${filename}" ]]; then
|
||||
echo "Archive is missing ${filename}." >&2
|
||||
exit 1
|
||||
|
|
@ -169,8 +169,8 @@ if [[ -e "${release_dir}" ]]; then
|
|||
(cd -- "${release_dir}" && sha256sum -c SHA256SUMS)
|
||||
else
|
||||
release_stage="$(mktemp -d "${releases_dir}/.incoming.XXXXXX")"
|
||||
install -m 0555 "${payload_dir}/NETfishingServer.x86_64" "${release_stage}/"
|
||||
install -m 0444 "${payload_dir}/NETfishingServer.pck" "${release_stage}/"
|
||||
install -m 0555 "${payload_dir}/straywildServer.x86_64" "${release_stage}/"
|
||||
install -m 0444 "${payload_dir}/straywildServer.pck" "${release_stage}/"
|
||||
install -m 0444 "${payload_dir}/BUILD_INFO" "${release_stage}/"
|
||||
install -m 0444 "${payload_dir}/SHA256SUMS" "${release_stage}/"
|
||||
install -m 0444 "${payload_dir}/SOURCE-CODE.md" "${release_stage}/"
|
||||
|
|
@ -207,7 +207,7 @@ if command -v systemctl >/dev/null && systemctl cat "${service_name}" >/dev/null
|
|||
if systemctl is-active --quiet "${service_name}"; then
|
||||
service_active=true
|
||||
unit_text="$(systemctl cat "${service_name}")"
|
||||
if [[ "${unit_text}" != *"${install_root}/current/NETfishingServer.x86_64"* ]]; then
|
||||
if [[ "${unit_text}" != *"${install_root}/current/straywildServer.x86_64"* ]]; then
|
||||
echo "Active ${service_name} does not use the current-release symlink." >&2
|
||||
echo "Migrate the unit while stopped before using this updater." >&2
|
||||
exit 1
|
||||
|
|
@ -244,7 +244,7 @@ if [[ -n "${old_current}" && "${old_current}" != "${release_dir}" ]]; then
|
|||
replace_symlink "${old_current}" "${install_root}/previous"
|
||||
fi
|
||||
|
||||
echo "Installed NETfishing dedicated server ${game_version} (${game_commit})."
|
||||
echo "Installed straywild dedicated server ${game_version} (${game_commit})."
|
||||
if [[ -n "${packaging_commit}" ]]; then
|
||||
echo "Dedicated packaging commit: ${packaging_commit}."
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ fi
|
|||
repository_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
dist_dir="${repository_dir}/dist"
|
||||
packages_dir="${repository_dir}/packages"
|
||||
package_name="netfishing-dedicated-server-${version}-linux-x86_64"
|
||||
package_name="straywild-dedicated-server-${version}-linux-x86_64"
|
||||
staging_dir="$(mktemp -d)"
|
||||
trap 'rm -rf -- "${staging_dir}"' EXIT
|
||||
|
||||
|
|
@ -25,8 +25,8 @@ if ! git -C "${repository_dir}" diff --quiet \
|
|||
fi
|
||||
|
||||
for filename in \
|
||||
NETfishingServer.x86_64 \
|
||||
NETfishingServer.pck \
|
||||
straywildServer.x86_64 \
|
||||
straywildServer.pck \
|
||||
BUILD_INFO \
|
||||
SOURCE-CODE.md \
|
||||
SHA256SUMS; do
|
||||
|
|
@ -78,10 +78,10 @@ fi
|
|||
(cd -- "${dist_dir}" && sha256sum -c SHA256SUMS)
|
||||
|
||||
install -d "${staging_dir}/${package_name}"
|
||||
install -m 0755 "${dist_dir}/NETfishingServer.x86_64" \
|
||||
"${staging_dir}/${package_name}/NETfishingServer.x86_64"
|
||||
install -m 0644 "${dist_dir}/NETfishingServer.pck" \
|
||||
"${staging_dir}/${package_name}/NETfishingServer.pck"
|
||||
install -m 0755 "${dist_dir}/straywildServer.x86_64" \
|
||||
"${staging_dir}/${package_name}/straywildServer.x86_64"
|
||||
install -m 0644 "${dist_dir}/straywildServer.pck" \
|
||||
"${staging_dir}/${package_name}/straywildServer.pck"
|
||||
install -m 0644 "${dist_dir}/BUILD_INFO" \
|
||||
"${staging_dir}/${package_name}/BUILD_INFO"
|
||||
install -m 0644 "${dist_dir}/SHA256SUMS" \
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ if [[ ${EUID} -ne 0 ]]; then
|
|||
exit 2
|
||||
fi
|
||||
|
||||
install_root="${NETFISHING_INSTALL_ROOT:-/opt/netfishing-server}"
|
||||
service_name="${NETFISHING_SERVICE_NAME:-netfishing-server.service}"
|
||||
install_root="${straywild_INSTALL_ROOT:-/opt/straywild-server}"
|
||||
service_name="${straywild_SERVICE_NAME:-straywild-server.service}"
|
||||
releases_dir="${install_root}/releases"
|
||||
|
||||
if [[ "${install_root}" != /* || "${install_root}" == "/" ]]; then
|
||||
echo "NETFISHING_INSTALL_ROOT must be a specific absolute directory." >&2
|
||||
echo "straywild_INSTALL_ROOT must be a specific absolute directory." >&2
|
||||
exit 2
|
||||
fi
|
||||
if [[ ! -L "${install_root}/current" || ! -L "${install_root}/previous" ]]; then
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
if [[ $# -ne 4 ]]; then
|
||||
echo "Usage: $0 /path/to/server-linux-x86_64 GAME_VERSION GAME_COMMIT /path/to/netfishing" >&2
|
||||
echo "Usage: $0 /path/to/server-linux-x86_64 GAME_VERSION GAME_COMMIT /path/to/straywild" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
|
|
@ -30,17 +30,17 @@ if [[ ! "${game_commit}" =~ ^[0-9a-f]{40}$ ]]; then
|
|||
exit 2
|
||||
fi
|
||||
if [[ ! -f "${game_repository}/project.godot" ]]; then
|
||||
echo "The NETfishing game repository was not found: ${game_repository}" >&2
|
||||
echo "The straywild 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
|
||||
echo "The straywild 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
|
||||
echo "The straywild repository must be clean before staging notices." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! "${packaging_commit}" =~ ^[0-9a-f]{40}$ ]]; then
|
||||
|
|
@ -48,7 +48,7 @@ if [[ ! "${packaging_commit}" =~ ^[0-9a-f]{40}$ ]]; then
|
|||
exit 2
|
||||
fi
|
||||
|
||||
for filename in NETfishingServer.x86_64 NETfishingServer.pck; do
|
||||
for filename in straywildServer.x86_64 straywildServer.pck; do
|
||||
if [[ ! -f "${source_dir}/${filename}" ]]; then
|
||||
echo "Missing ${source_dir}/${filename}" >&2
|
||||
exit 1
|
||||
|
|
@ -56,10 +56,10 @@ for filename in NETfishingServer.x86_64 NETfishingServer.pck; do
|
|||
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"
|
||||
install -m 0755 "${source_dir}/straywildServer.x86_64" \
|
||||
"${destination_dir}/straywildServer.x86_64"
|
||||
install -m 0644 "${source_dir}/straywildServer.pck" \
|
||||
"${destination_dir}/straywildServer.pck"
|
||||
rm -rf -- "${licenses_dir}"
|
||||
install -d -m 0755 "${licenses_dir}"
|
||||
install -m 0644 "${game_repository}/LICENSE" \
|
||||
|
|
@ -76,8 +76,8 @@ 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}')"
|
||||
pck_sha256="$(sha256sum NETfishingServer.pck | awk '{print $1}')"
|
||||
executable_sha256="$(sha256sum straywildServer.x86_64 | awk '{print $1}')"
|
||||
pck_sha256="$(sha256sum straywildServer.pck | awk '{print $1}')"
|
||||
|
||||
apply_umask="$(umask)"
|
||||
umask 022
|
||||
|
|
@ -94,19 +94,19 @@ printf '%s\n' \
|
|||
cat >SOURCE-CODE.md <<EOF
|
||||
# Corresponding source
|
||||
|
||||
NETfishing dedicated game-server code is licensed under GPL-3.0-or-later.
|
||||
straywild dedicated game-server code is licensed under GPL-3.0-or-later.
|
||||
|
||||
Source repository: https://forge.makearmy.io/woofmeow/netfishing
|
||||
Source repository: https://forge.makearmy.io/woofmeow/straywild
|
||||
Exact game source revision: ${game_commit}
|
||||
|
||||
Packaging source:
|
||||
https://forge.makearmy.io/woofmeow/netfishing-dedicated-server
|
||||
https://forge.makearmy.io/woofmeow/straywild-dedicated-server
|
||||
Exact packaging source revision: ${packaging_commit}
|
||||
EOF
|
||||
umask "${apply_umask}"
|
||||
sha256sum \
|
||||
NETfishingServer.x86_64 \
|
||||
NETfishingServer.pck \
|
||||
straywildServer.x86_64 \
|
||||
straywildServer.pck \
|
||||
BUILD_INFO \
|
||||
SOURCE-CODE.md \
|
||||
licenses/GPL-3.0-or-later.txt \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue