forked from OpenSlides/OpenSlides
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Magnus Schieder
authored and
Magnus Schieder
committed
Jul 3, 2024
1 parent
812afc2
commit 8101bc4
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
#!/bin/bash | ||
|
||
command -v awk > /dev/null || { | ||
echo "Error: 'awk' not installed!" | ||
command -v gawk > /dev/null || { | ||
echo "Error: 'gawk' not installed!" | ||
exit 1 | ||
} | ||
|
||
REMOTE_NAME=upstream | ||
git ls-remote --exit-code "$REMOTE_NAME" &>/dev/null || | ||
REMOTE_NAME=origin | ||
|
||
STABLE=$(awk -v FS=. -v OFS=. '{$3="x" ; print $0}' VERSION) | ||
STABLE=$(gawk -v FS=. -v OFS=. '{$3="x" ; print $0}' VERSION) | ||
git fetch -q $REMOTE_NAME stable/$STABLE || exit 1 | ||
|
||
STAGING="$(git show "$REMOTE_NAME/stable/$STABLE:VERSION" | awk -v FS=. -v OFS=. '{$3=$3+1 ; print $0}')" | ||
STAGING="$(git show "$REMOTE_NAME/stable/$STABLE:VERSION" | gawk -v FS=. -v OFS=. '{$3=$3+1 ; print $0}')" | ||
|
||
git fetch -q $REMOTE_NAME staging/$STAGING || exit 1 | ||
|
||
git log --graph --oneline -U0 --submodule $REMOTE_NAME/stable/$STABLE..$REMOTE_NAME/staging/$STAGING | \ | ||
awk -v version="$STAGING" ' | ||
gawk -v version="$STAGING" ' | ||
/^*.*Staging update [0-9]{8}/ { printf("\n# %s-staging-%s-%s\n", version, $NF, substr($2, 0, 7)) } | ||
/^*/ { printf(" %s\n",$0) } | ||
/\| Submodule/ {printf(" %s %s\n", $3, $4)} | ||
/\| >/ { $1=""; $2=""; printf(" %s\n", $0 )} | ||
/^\| Submodule/ {printf(" %s %s\n", $3, $4)} | ||
/^\| >/ { $1=""; $2=""; printf(" %s\n", $0 )} | ||
' |