diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7ad325e..a09c78e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-08-05T10:52:55Z by kres faf91e3. +# Generated on 2024-08-27T16:43:03Z by kres 7048c24. name: default concurrency: @@ -33,7 +33,7 @@ jobs: labels: ${{ steps.retrieve-pr-labels.outputs.result }} services: buildkitd: - image: moby/buildkit:v0.15.0 + image: moby/buildkit:v0.15.2 options: --privileged ports: - 1234:1234 @@ -129,7 +129,7 @@ jobs: - default services: buildkitd: - image: moby/buildkit:v0.15.0 + image: moby/buildkit:v0.15.2 options: --privileged ports: - 1234:1234 diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml index c07ffb4..eb6fdd6 100644 --- a/.github/workflows/weekly.yaml +++ b/.github/workflows/weekly.yaml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-08-05T10:52:55Z by kres faf91e3. +# Generated on 2024-08-27T16:43:03Z by kres 7048c24. name: weekly concurrency: @@ -16,7 +16,7 @@ jobs: - pkgs services: buildkitd: - image: moby/buildkit:v0.15.0 + image: moby/buildkit:v0.15.2 options: --privileged ports: - 1234:1234 diff --git a/Makefile b/Makefile index ae872af..dd3da42 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-07-02T11:12:13Z by kres 582671e. +# Generated on 2024-08-27T16:11:17Z by kres 8e4bbb4. # common variables @@ -25,7 +25,7 @@ SOURCE_DATE_EPOCH := $(shell git log $(INITIAL_COMMIT_SHA) --pretty=%ct) # sync bldr image with pkgfile -BLDR_RELEASE := v0.3.1 +BLDR_RELEASE := v0.3.2 BLDR_IMAGE := ghcr.io/siderolabs/bldr:$(BLDR_RELEASE) BLDR := docker run --rm --user $(shell id -u):$(shell id -g) --volume $(PWD):/src --entrypoint=/bldr $(BLDR_IMAGE) --root=/src diff --git a/Pkgfile b/Pkgfile index 514550d..9745184 100644 --- a/Pkgfile +++ b/Pkgfile @@ -6,9 +6,9 @@ vars: BOOTSTRAP: /bootstrap # renovate: datasource=git-tags extractVersion=^binutils-(?.*)$ depName=git://sourceware.org/git/binutils-gdb.git - binutils_version: 2_43 - binutils_sha256: b53606f443ac8f01d1d5fc9c39497f2af322d99e14cea5c0b4b124d630379365 - binutils_sha512: 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb + binutils_version: 2_43_1 + binutils_sha256: 13f74202a3c4c51118b797a39ea4200d3f6cfbe224da6d1d95bb938480132dfd + binutils_sha512: 20977ad17729141a2c26d358628f44a0944b84dcfefdec2ba029c2d02f40dfc41cc91c0631044560d2bd6f9a51e1f15846b4b311befbe14f1239f14ff7d57824 # renovate: datasource=git-tags extractVersion=^releases/gcc-(?.*)$ depName=git://gcc.gnu.org/git/gcc.git gcc_version: 13.3.0 @@ -32,9 +32,9 @@ vars: mpc_sha512: 4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97 # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git - linux_version: 6.6.44 - linux_sha256: 93218296934915636fe6ba08e125948424cc270fd8948502c0ab91087a9fccd8 - linux_sha512: 75ea5973af1d9994c5bc7d4538a314100ffb9daf40c98cbd7eb4f409ceb5d007abc257cd7017221817f2a8d8f097558e7498a90b88ec2f3b4a611eda8b794fb4 + linux_version: 6.6.47 + linux_sha256: d43376c9e9eaa92bb1b926054bd160d329c58a62d64bd65fe1222c11c6564f50 + linux_sha512: 9a3c52f5df4480a61493ca24d25c9e9b5b9dfe2e465ecf7d457bc240abf88b2d08d745b63895c6b47a557fca610882bbc8b5fe66b2d7a9262f548daca50d4004 # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://git.musl-libc.org/musl musl_version: 1.2.5 diff --git a/hack/release.sh b/hack/release.sh index 6216503..44675ec 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -2,7 +2,7 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2023-11-02T09:07:46Z by kres 3a2980e-dirty. +# Generated on 2024-08-27T16:11:17Z by kres 8e4bbb4. set -e @@ -44,9 +44,92 @@ function commit { exit 1 fi + if is_on_main_branch; then + update_license_files + fi + git commit -s -m "release($1): prepare release" -m "This is the official $1 release." } +function is_on_main_branch { + main_remotes=("upstream" "origin") + branch_names=("main" "master") + current_branch=$(git rev-parse --abbrev-ref HEAD) + + echo "Check current branch: $current_branch" + + for remote in "${main_remotes[@]}"; do + echo "Fetch remote $remote..." + + if ! git fetch --quiet "$remote" &>/dev/null; then + echo "Failed to fetch $remote, skip..." + + continue + fi + + for branch_name in "${branch_names[@]}"; do + if ! git rev-parse --verify "$branch_name" &>/dev/null; then + echo "Branch $branch_name does not exist, skip..." + + continue + fi + + echo "Branch $remote/$branch_name exists, comparing..." + + merge_base=$(git merge-base "$current_branch" "$remote/$branch_name") + latest_main=$(git rev-parse "$remote/$branch_name") + + if [ "$merge_base" = "$latest_main" ]; then + echo "Current branch is up-to-date with $remote/$branch_name" + + return 0 + else + echo "Current branch is not on $remote/$branch_name" + + return 1 + fi + done + done + + echo "No main or master branch found on any remote" + + return 1 +} + +function update_license_files { + script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + parent_dir="$(dirname "$script_dir")" + current_year=$(date +"%Y") + change_date=$(date -v+4y +"%Y-%m-%d" 2>/dev/null || date -d "+4 years" +"%Y-%m-%d" 2>/dev/null || date --date="+4 years" +"%Y-%m-%d") + + # Find LICENSE and .kres.yaml files recursively in the parent directory (project root) + find "$parent_dir" \( -name "LICENSE" -o -name ".kres.yaml" \) -type f | while read -r file; do + temp_file="${file}.tmp" + + if [[ $file == *"LICENSE" ]]; then + if grep -q "^Business Source License" "$file"; then + sed -e "s/The Licensed Work is (c) [0-9]\{4\}/The Licensed Work is (c) $current_year/" \ + -e "s/Change Date: [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/Change Date: $change_date/" \ + "$file" >"$temp_file" + else + continue # Not a Business Source License file + fi + elif [[ $file == *".kres.yaml" ]]; then + sed -E 's/^([[:space:]]*)ChangeDate:.*$/\1ChangeDate: "'"$change_date"'"/' "$file" >"$temp_file" + fi + + # Check if the file has changed + if ! cmp -s "$file" "$temp_file"; then + mv "$temp_file" "$file" + echo "Updated: $file" + git add "$file" + else + echo "No changes: $file" + rm "$temp_file" + fi + done +} + if declare -f "$1" > /dev/null then cmd="$1" @@ -55,7 +138,7 @@ then else cat <