dfdb1f2680
Your old version of the software released under the old license can still be used under the terms of the old license. I have received the following statement from the past contributors Luis Holanda, Jeremy Volkman and Fabian Hahn: I hereby confirm that I am the copyright holder or authorized by the copyright holder of this contribution. As such I hereby confirm that all contributions made to bazel-zig-cc by me or on behalf of me, hereby is licensed under the Apache 2.0 License [http://www.apache.org/licenses/LICENSE-2.0]. I am aware that my previous contributions will still be available under the MIT license as well. I confirm that I am aware of the bazel-zig-cc teams intention to release bazel-zig-cc under the Apache 2.0 License from release [1.0] and onwards, and that the bazel-zig-cc no longer will accept contributions made under the MIT and that any future submissions from myself will be considered to be licensed under Apache 2.0 unless I expressly state otherwise. Copyright and re-licensing for Google and Uber employees has been resolved internally. Since not all contributors took action to re-license the code yet, portions of bazel-zig-cc remain licensed as MIT. I have started this project during my personal time with my personal resources. I am now handing over all copyrights to this code to Uber Technologies, Inc.
39 lines
1.0 KiB
Bash
Executable File
39 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright 2023 Uber Technologies, Inc.
|
|
# Licensed under the Apache License, Version 2.0
|
|
|
|
set -xeuo pipefail
|
|
|
|
sign=(-u motiejus@jakstys.lt)
|
|
[[ $1 == "--nosign" ]] && { sign=(); shift; }
|
|
|
|
_err(){ >&2 echo "ERROR: $*"; exit 1; }
|
|
|
|
git status --porcelain | grep -q "" &&
|
|
_err "working tree is dirty, commit your changes first."
|
|
|
|
[[ "$1" =~ ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?(-rc([0-9]+))?$ ]] || \
|
|
_err "arg1 accepts the following formats: v1.0 v1.0.0 v1.0-rc1 v1.0.1-rc1"
|
|
|
|
git tag | grep -q "^$1$" &&
|
|
_err "tag $1 already exists"
|
|
|
|
last_tag=$(git tag | tail -1)
|
|
|
|
{
|
|
echo bazel-zig-cc "$1"
|
|
echo
|
|
echo Changelog since "$last_tag":
|
|
git log --pretty=format:"- [%an] %s" "$last_tag"..HEAD | \
|
|
grep -v "Update release notes for $last_tag"
|
|
} | git tag "${sign[@]}" -F - "$1"
|
|
|
|
shasum=$(git archive --prefix="bazel-zig-cc-$1/" --format=tar "$1" | \
|
|
gzip -n | sha256sum | cut -f1 -d" ")
|
|
|
|
./relnotes.awk -v tag="$1" -v sha256sum="$shasum" README.md | sponge README.md
|
|
|
|
git add README.md
|
|
git commit -m "Update release notes for $1"
|