Skip to content

Commit ac8f7ba

Browse files
committed
publish: clean workspace
1 parent 637bee7 commit ac8f7ba

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.actions/git-diff-sync.sh

+5-9
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ set -ex
44
printf "Detect changes for: $1 >> $2\n\n"
55

66
b1="${1//'/'/'_'}"
7-
printf "Branch alias: $b1\n"
87
# list all dirs in source branch
98
python .actions/assistant.py list_dirs > "dirs-$b1.txt"
10-
cat "dirs-$b1.txt"
9+
printf "Branch alias: $b1\n" && cat "dirs-$b1.txt"
1110

1211
head=$(git rev-parse origin/$2)
1312
git diff --name-only $head --output=target-diff.txt
@@ -19,19 +18,16 @@ cp -r .actions/ _TEMP/.actions/
1918

2019
git checkout $2
2120
b2="${2//'/'/'_'}"
22-
printf "Branch alias: $b2\n"
2321
# recover the original CLI
2422
#rm -rf .actions && mv _TEMP/.actions .actions
2523
# list all dirs in target branch
2624
python _TEMP/.actions/assistant.py list_dirs ".notebooks" --include_file_ext=".ipynb" > "dirs-$b2.txt"
27-
cat "dirs-$b2.txt"
25+
printf "Branch alias: $b2\n" && cat "dirs-$b2.txt"
2826

2927
printf "\n\n"
3028
git merge --ff -s resolve origin/$1
3129

3230
python _TEMP/.actions/assistant.py group-folders target-diff.txt --fpath_actual_dirs "['dirs-$b1.txt', 'dirs-$b2.txt']"
33-
printf "\n================\nChanged folders:\n----------------\n"
34-
cat changed-folders.txt
35-
printf "\n================\nDropped folders:\n----------------\n"
36-
cat dropped-folders.txt
37-
printf "\n"
31+
printf "\n================\nChanged folders:\n----------------\n" && cat changed-folders.txt
32+
printf "\n================\nDropped folders:\n----------------\n" && cat dropped-folders.txt
33+

.azure/ipynb-publish.yml

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
- job: sync_pub
1313
pool:
1414
vmImage: "Ubuntu-20.04"
15+
workspace:
16+
clean: all
1517
variables:
1618
ACCELERATOR: CPU,GPU
1719
PUB_BRANCH: publication
@@ -90,6 +92,8 @@ jobs:
9092
container:
9193
image: $(docker-image)
9294
options: "--gpus=all --shm-size=32g -v /usr/bin/docker:/tmp/docker:ro"
95+
workspace:
96+
clean: all
9397

9498
variables:
9599
ACCELERATOR: CPU,GPU

0 commit comments

Comments
 (0)