mirror of
https://github.com/getsentry/self-hosted.git
synced 2025-12-08 19:46:14 +00:00
* Reference paths relative to the current script or project root Before this PR: - some scripts change the current working directory and use relative paths - different approaches are taken to know which directory a script is running in - paths are sometimes relative, sometimes absolute, sometimes traversing directories After this PR: - scripts do neither change nor care much about the current working directory - a unified approach determines the directory of the current script - paths are always relative to the project root This should resolve an issue I already tried to fix with https://github.com/getsentry/self-hosted/pull/1798, where the contents of `./sentry` were not copied into the built container image, thus `enhance-image.sh` did not apply. Co-authored-by: Amin Vakil <info@aminvakil.com>
14 lines
586 B
Bash
Executable File
14 lines
586 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -ex
|
|
|
|
source install/_lib.sh
|
|
source install/dc-detect-version.sh
|
|
|
|
# Negated version of ensure-customizations-not-present.sh, make changes in sync
|
|
echo "${_group}Ensure customizations work"
|
|
$dcr --no-deps web bash -c "if [ ! -e /created-by-enhance-image ]; then exit 1; fi"
|
|
$dcr --no-deps --entrypoint=/etc/sentry/entrypoint.sh sentry-cleanup bash -c "if [ ! -e /created-by-enhance-image ]; then exit 1; fi"
|
|
$dcr --no-deps web python -c "import ldap"
|
|
$dcr --no-deps --entrypoint=/etc/sentry/entrypoint.sh sentry-cleanup python -c "import ldap"
|
|
echo "${_endgroup}"
|