diff --git a/docs/release_notes.sh b/docs/release_notes.sh new file mode 100755 index 00000000..9b761be9 --- /dev/null +++ b/docs/release_notes.sh @@ -0,0 +1,92 @@ +#!/bin/bash + +script_dir=$(dirname "$0") + +source "${script_dir}/../versions.txt" +from_commit="$1" +new_release="$2" + +usage(){ + echo "Usage $0 [new-release-version]" + echo "commit/tag: will be used as start point to get release notes" + echo "new-release: new release version that will have the " + exit -1 +} + +if [ -z "$from_commit" ]; then + usage +fi + +git fetch --tags + +if [ -z "$new_release" ] ;then + runtime_version=$(cat "${script_dir}/../VERSION") +else + runtime_version="${new_release}" +fi + +if git describe --exact-match --tags HEAD 2> /dev/null ;then + commit_id="$(git describe --exact-match --tags HEAD)" +else + commit_id="$(git rev-parse HEAD)" +fi + + + +changes(){ + echo "## Changes" + git log --merges "$from_commit"..HEAD | awk '/Merge pull/{getline; getline;print }' | \ + while read -r pr + do + echo "- ${pr}" + done + + echo "" + + echo "## Shortlog" + for cr in $(git log --merges "$from_commit"..HEAD | grep 'Merge:' | awk '{print $2".."$3}'); + do + git log --oneline "$cr" + done +} + +limitations(){ + grep -P '^###\s|^####\s|See issue' "${script_dir}/limitations.md" +} + +cat << EOT +# Release ${runtime_version} + +$(changes) + +## Compatibility with Docker +Clear Containers ${runtime_version} is compatible with Docker ${docker_version} +## OCI Runtime Specification +Clear Containers ${runtime_version} support the OCI Runtime Specification [${oci_spec_version}][ocispec] + +## Clear Linux Containers image +Clear Containers ${runtime_version} requires at least Clear Linux containers image [${clear_vm_image_version}][clearlinuximage] + +## Clear Linux Containers Kernel +Clear Containers ${runtime_version} requires at least Clear Linux Containers kernel [${clear_container_kernel}][kernel] + +## Installation +- [Ubuntu][ubuntu] +- [Fedora][fedora] +- [Developers][developers] + + +## Issues & limitations + +$(limitations) +More information [Limitations][limitations] + +[clearlinuximage]: https://download.clearlinux.org/releases/${clear_vm_image_version}/clear/clear-${clear_vm_image_version}-containers.img.xz +[kernel]: https://github.com/clearcontainers/linux/tree/${clear_container_kernel} +[ocispec]: https://github.com/opencontainers/runtime-spec/releases/tag/${oci_spec_version} +[limitations]: https://github.com/clearcontainers/runtime/blob/${commit_id}/docs/limitations.md +[ubuntu]: https://github.com/clearcontainers/runtime/blob/${commit_id}/docs/ubuntu-installation-guide.md +[fedora]: https://github.com/clearcontainers/runtime/blob/${commit_id}/docs/fedora-installation-guide.md +[developers]: https://github.com/clearcontainers/runtime/blob/${commit_id}/docs/developers-clear-containers-install.md + +EOT diff --git a/versions.txt b/versions.txt new file mode 100644 index 00000000..ef316c95 --- /dev/null +++ b/versions.txt @@ -0,0 +1,8 @@ +#Clear Containers image from https://download.clearlinux.org/releases/ +clear_vm_image_version=16910 +#Kernel configuration and patches from https://github.com/clearcontainers/linux +clear_container_kernel=cc-linux-4.9.35 +#Docker suported version +docker_version=v17.06-ce +#Supported OCI spec +oci_spec_version=1.0.0-rc5