-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathscript.sh
More file actions
executable file
·29 lines (21 loc) · 759 Bytes
/
script.sh
File metadata and controls
executable file
·29 lines (21 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
set -Eeuo pipefail
# Set env variables in order to experience a behaviour closer to what happens
# in the CI locally. It should not hurt to set those in the CI as the CI should
# contain those values.
export CI=1
export COMPOSER_NO_INTERACTION=1
readonly ORIGINAL_WORKING_DIR=$(pwd)
trap "cd ${ORIGINAL_WORKING_DIR}" err exit
# Change to script directory
cd "$(dirname "$0")"
# Ensure we have a clean state
rm -rf actual.txt || true
rm -rf composer.lock || true
rm -rf vendor || true
rm -rf vendor-bin/*/composer.lock || true
rm -rf vendor-bin/*/vendor || true
# Install the plugin once.
composer update --no-audit > /dev/null
# Actual command to execute the test itself
composer bin root update --no-audit 2>&1 | tee > actual.txt