eden/.ci/source.sh
Caio Oliveira 1d43b20312 [ci, tools] shellcheck-ed
* now license-header.sh is POSIX compliant
* update-icons now checks for dependencies the correct way
* add --help to license-header
* nuke reset-submodules
* add missing shebang to .ci/windows/package.sh

* Below the error/warnings/infos from shellcheck:
-- SC2068 (error): Double quote array expansions to avoid re-splitting elements.

-- SC3054 (warning): In POSIX sh, array references are undefined.
-- SC2155 (warning): Declare and assign separately to avoid masking return values.
-- SC2046 (warning): Quote this to prevent word splitting.

-- SC2236 (style): Use -n instead of ! -z.
-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
-- SC2001 (style): See if you can use ${variable//search/replace} instead.

-- SC2086 (info): Double quote to prevent globbing and word splitting.
-- SC2185 (info): Some finds don't have a default path. Specify '.' explicitly.

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
2025-09-18 02:29:28 +02:00

25 lines
795 B
Bash
Executable file

#!/bin/bash -ex
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# git-archive-all
export PATH="$PATH:/home/$USER/.local/bin"
GITDATE="$(git show -s --date=short --format='%ad' | sed 's/-//g')"
GITREV="$(git show -s --format='%h')"
REV_NAME="eden-unified-source-${GITDATE}-${GITREV}"
COMPAT_LIST='dist/compatibility_list/compatibility_list.json'
mkdir artifacts
touch "${COMPAT_LIST}"
git describe --abbrev=0 --always HEAD > GIT-COMMIT
git describe --tags HEAD > GIT-TAG || echo 'unknown' > GIT-TAG
git-archive-all --include "${COMPAT_LIST}" --include GIT-COMMIT --include GIT-TAG --force-submodules artifacts/"${REV_NAME}.tar"
cd artifacts/
xz -T0 -9 "${REV_NAME}.tar"
sha256sum "${REV_NAME}.tar.xz" > "${REV_NAME}.tar.xz.sha256sum"
cd ..