mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00

Having a clear separation between when we manipulate variables and when we export them to GITHUB_ENV makes it less error-prone.
22 lines
607 B
Bash
Executable File
22 lines
607 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -o pipefail
|
|
|
|
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
# shellcheck source-path=SCRIPTDIR
|
|
source "${CI_DIR}/common/suite.sh"
|
|
|
|
mkdir -p "$CACHE_DIR"
|
|
|
|
# Update the third-party dependency cache only if the build was successful.
|
|
if ended_successfully && [ -d "${DEPS_BUILD_DIR}" ]; then
|
|
# Do not cache downloads. They should not be needed with up-to-date deps.
|
|
rm -rf "${DEPS_BUILD_DIR}/build/downloads"
|
|
rm -rf "${CACHE_NVIM_DEPS_DIR}"
|
|
mv "${DEPS_BUILD_DIR}" "${CACHE_NVIM_DEPS_DIR}"
|
|
|
|
touch "${CACHE_MARKER}"
|
|
echo "Updated third-party dependencies."
|
|
fi
|