Skip to content

Commit 5f03929

Browse files
committed
chore: update compiled workflows via e2e.sh
1 parent b480993 commit 5f03929

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

clean.sh

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# 3. Delete test branches matching specific patterns
1212
# 4. Provide detailed logging of all cleanup operations
1313

14-
set -uo pipefail
14+
set -euo pipefail
1515

1616
# Colors for output
1717
RED='\033[0;31m'
@@ -100,6 +100,36 @@ main() {
100100
echo
101101

102102
log "Starting cleanup at $(date)"
103+
104+
# Remove build artifacts (source staging dir & compiled binaries) before doing anything else
105+
# Assumptions:
106+
# - The working directory is the repo root
107+
# - The compiled binary is named 'gh-aw' at repo root (and potentially under gh-aw-src during dev)
108+
# - The user wants gh-aw-src fully removed (will be recreated by future build steps)
109+
if [[ -d ./gh-aw-src ]]; then
110+
info "Removing ./gh-aw-src directory"
111+
rm -rf ./gh-aw-src || warning "Failed to remove ./gh-aw-src"
112+
else
113+
info "No ./gh-aw-src directory to remove"
114+
fi
115+
116+
for bin in ./gh-aw ./gh-aw-src/gh-aw; do
117+
if [[ -f "$bin" || -L "$bin" ]]; then
118+
info "Removing compiled binary $bin"
119+
rm -f "$bin" || warning "Failed to remove $bin"
120+
fi
121+
done
122+
123+
# Remove e2e test log files
124+
if compgen -G "e2e-test-*.log" > /dev/null; then
125+
info "Removing e2e test log files"
126+
for logf in e2e-test-*.log; do
127+
info "Deleting $logf"
128+
rm -f "$logf" || warning "Failed to delete $logf"
129+
done
130+
else
131+
info "No e2e test log files to remove"
132+
fi
103133

104134
# Check if gh CLI is available and authenticated
105135
if ! command -v gh &> /dev/null; then

0 commit comments

Comments
 (0)