diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/cirrus/runner.sh | 19 | ||||
-rwxr-xr-x | contrib/pkginstaller/scripts/postinstall | 21 | ||||
-rwxr-xr-x | contrib/pkginstaller/scripts/preinstall | 4 |
3 files changed, 24 insertions, 20 deletions
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 6b2d123f2..5b1bc8d5c 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -233,6 +233,25 @@ function _run_consistency() { SUGGESTION="run 'make generate-bindings' and commit all changes" ./hack/tree_status.sh make completions SUGGESTION="run 'make completions' and commit all changes" ./hack/tree_status.sh + + if [[ -z "$CIRRUS_TAG" ]] && \ + req_env_vars CIRRUS_CHANGE_IN_REPO CIRRUS_PR DEST_BRANCH + then + local base diffs regex i + # Prevent this check from detecting itself + i=i + msg "#####" + msg "Verifying no change adds new calls to ${i}o/${i}outil." + base=$(git merge-base $DEST_BRANCH $CIRRUS_CHANGE_IN_REPO) + diffs=$(git diff $base $CIRRUS_CHANGE_IN_REPO -- '*.go' ':^vendor/') + regex=$(echo -e "^(\\+.+${i}o/${i}outil)|(\\+.+${i}outil\\..+)") + if egrep -q "$regex"<<<"$diffs"; then + die "Found attempted use of deprecated ${i}outils: +$(egrep -B 5 -A 5 "$regex"<<<"$diffs")" + fi + else + msg "Skipping check for ${i}o/${i}outil addition." + fi } function _run_build() { diff --git a/contrib/pkginstaller/scripts/postinstall b/contrib/pkginstaller/scripts/postinstall index db17eede8..c62971a14 100755 --- a/contrib/pkginstaller/scripts/postinstall +++ b/contrib/pkginstaller/scripts/postinstall @@ -2,26 +2,7 @@ set -e -BZSH_PODMAN_PATH_EXP='PATH="/opt/podman/bin:$PATH"' -FISH_PODMAN_PATH_EXP='set PATH "/opt/podman/bin $PATH"' -BASHRC_PATH="$HOME/.bash_profile" -ZSHENV_PATH="$HOME/.zshenv" -ZSHRC_PATH="$HOME/.zshrc" -FSHCFG_PATH="$HOME/.config/fish/config.fish" - -# append /Applications/podman/bin to $PATH -if [ -f "$BASHRC_PATH" ]; then - grep -Fxq "$BZSH_PODMAN_PATH_EXP" "$BASHRC_PATH" || echo "$BZSH_PODMAN_PATH_EXP" >> "$BASHRC_PATH" -fi -if [ -f "$ZSHENV_PATH" ]; then - grep -Fxq "$BZSH_PODMAN_PATH_EXP" "$ZSHENV_PATH" || echo "$BZSH_PODMAN_PATH_EXP" >> "$ZSHENV_PATH" -fi -if [ -f "$ZSHRC_PATH" ]; then - grep -Fxq "$BZSH_PODMAN_PATH_EXP" "$ZSHRC_PATH" || echo "$BZSH_PODMAN_PATH_EXP" >> "$ZSHRC_PATH" -fi -if [ -f "$FSHCFG_PATH" ]; then - grep -Fxq "$FISH_PODMAN_PATH_EXP" "$FSHCFG_PATH" || echo "$FISH_PODMAN_PATH_EXP" >> "$FSHCFG_PATH" -fi +echo "/opt/podman/bin" > /etc/paths.d/podman-pkg ln -s /opt/podman/bin/podman-mac-helper /opt/podman/qemu/bin/podman-mac-helper ln -s /opt/podman/bin/gvproxy /opt/podman/qemu/bin/gvproxy diff --git a/contrib/pkginstaller/scripts/preinstall b/contrib/pkginstaller/scripts/preinstall index a381868fc..22336222f 100755 --- a/contrib/pkginstaller/scripts/preinstall +++ b/contrib/pkginstaller/scripts/preinstall @@ -3,3 +3,7 @@ set -e rm -rf /opt/podman + +if [ ! -d "/etc/paths.d" ]; then + mkdir -p /etc/paths.d +fi |