Skip to content

Commit

Permalink
Fix the DDC hash generated by ddc_sync
Browse files Browse the repository at this point in the history
See merge request gysela-developpers/gyselalibxx!446

--------------------------------------------

Co-authored-by: Thomas Padioleau <[email protected]>
  • Loading branch information
tpadioleau committed Apr 10, 2024
1 parent 0315225 commit 2c62f0d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions bin/ddc_sync
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ cd ..

rm -rf vendor/ddc
git clone --depth 1 https://github.com/CExA-project/ddc.git vendor/ddc
DDC_VERSION="$(git -C vendor/ddc rev-parse --short HEAD)"
if [ 0 -eq "$(git config user.email | wc -c )" ]
then export GIT_COMMITTER_EMAIL="$(git -C vendor/ddc show -s --format='%ae' HEAD)"
fi
if [ 0 -eq "$(git config user.name | wc -c )" ]
then export GIT_COMMITTER_NAME="$(git -C vendor/ddc show -s --format='%an' HEAD)"
fi
rm -rf vendor/ddc/.git

if [ '(' "x$1" = "x--push" -o "x$1" = "x--commit" ')' -a -n "$(git status --porcelain)" ]
then
if [ 0 -eq "$(git config user.email | wc -c )" ]
then export GIT_COMMITTER_EMAIL="$(git -C vendor/ddc show -s --format='%ae' HEAD)"
fi
if [ 0 -eq "$(git config user.name | wc -c )" ]
then export GIT_COMMITTER_NAME="$(git -C vendor/ddc show -s --format='%an' HEAD)"
fi
git add -A vendor/ddc
git commit -m "Sync DDC version $(git -C vendor/ddc rev-parse --short HEAD)"
git commit -m "Sync DDC version $DDC_VERSION"
if [ "x$1" = "x--push" ]
then git push
fi
Expand Down

0 comments on commit 2c62f0d

Please sign in to comment.