9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2026-01-04 15:31:43 +00:00

start fresh with commit history

dw, they're kept up on a private repository
This commit is contained in:
Samsuik
2023-10-17 20:45:52 +01:00
commit 2570c66290
47 changed files with 7150 additions and 0 deletions

27
scripts/upstreamCommit.sh Normal file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# requires curl & jq
# upstreamCommit <baseHash> <newHash>
# param: bashHash - the commit hash to use for comparing commits (baseHash...newHash)
# param: newHash - the commit hash to use for comparing commits
(
set -e
PS1="$"
paper=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/PaperMC/Paper/compare/$1...$2 | jq -r '.commits[] | "PaperMC/Paper@\(.sha[:7]) \(.commit.message | split("\r\n")[0] | split("\n")[0])"')
updated=""
logsuffix=""
if [ ! -z "paper" ]; then
logsuffix="$logsuffix\n\nPaper Changes:\n$paper"
updated="Paper"
fi
disclaimer="Upstream has released updates that appear to apply and compile correctly"
log="${UP_LOG_PREFIX}Updated Upstream ($updated)\n\n${disclaimer}${logsuffix}"
echo -e "$log" | git commit -F -
) || exit 1