mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 08:48:21 +03:00
add backport script (#19331)
This commit is contained in:
parent
79929ac266
commit
91c1c216f1
27
sdk/bin/backport-all
Executable file
27
sdk/bin/backport-all
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
cd "$DIR/.."
|
||||
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Working tree not clean, not doing anything."
|
||||
#exit 1
|
||||
fi
|
||||
|
||||
cherry=$(git rev-parse ${1:-HEAD})
|
||||
|
||||
for v in 3.0 2.9 2.8 2.7 2.3; do
|
||||
if [ "$v" = "2.9" ]; then
|
||||
target=main-2.x
|
||||
else
|
||||
target=release/$v.x
|
||||
fi
|
||||
git checkout origin/$target
|
||||
git cherry-pick $cherry
|
||||
git push origin HEAD:refs/heads/backport-$v-${cherry:0:8}
|
||||
done
|
||||
|
||||
git checkout main
|
Loading…
Reference in New Issue
Block a user