Skip to content

Commit

Permalink
publish: clean workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jul 19, 2024
1 parent 637bee7 commit ac8f7ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .actions/git-diff-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ set -ex
printf "Detect changes for: $1 >> $2\n\n"

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

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

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

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

python _TEMP/.actions/assistant.py group-folders target-diff.txt --fpath_actual_dirs "['dirs-$b1.txt', 'dirs-$b2.txt']"
printf "\n================\nChanged folders:\n----------------\n"
cat changed-folders.txt
printf "\n================\nDropped folders:\n----------------\n"
cat dropped-folders.txt
printf "\n"
printf "\n================\nChanged folders:\n----------------\n" && cat changed-folders.txt
printf "\n================\nDropped folders:\n----------------\n" && cat dropped-folders.txt

4 changes: 4 additions & 0 deletions .azure/ipynb-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
- job: sync_pub
pool:
vmImage: "Ubuntu-20.04"
workspace:
clean: all
variables:
ACCELERATOR: CPU,GPU
PUB_BRANCH: publication
Expand Down Expand Up @@ -90,6 +92,8 @@ jobs:
container:
image: $(docker-image)
options: "--gpus=all --shm-size=32g -v /usr/bin/docker:/tmp/docker:ro"
workspace:
clean: all

variables:
ACCELERATOR: CPU,GPU
Expand Down

0 comments on commit ac8f7ba

Please sign in to comment.