blob: 79592892fa39c875ff4db523d7b8de5abbbf242b [file]
#!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
import sys as _sys
from util import *
template = \
"""
---
layout: default_md
title: Artemis {version} Release Notes
title-class: page-title-artemis
type: artemis
---
- [A list of commits](commit-report-{version}).
- Please see the ["Versions"](https://artemis.apache.org/components/artemis/documentation/latest/versions.html) chapter in the User Guide for upgrade instructions.
**Note:** As part of [establishing Apache Artemis](/news/artemis-tlp) as an independent project, the [Maven groupId has switched to _org.apache.artemis_](/artemis-tlp-groupid-migration).
**Note**: This release requires use of Java 17 or above.
{release_notes}
"""
def create_release_notes(version):
output_path = "src/components/artemis/download/release-notes-{}.md".format(version)
release_notes = render_release_notes("artemis", version)
output = template.format(**locals())
output = output.strip()
write_utf8(output_path, output)
return output_path
ARGS = _sys.argv
if len(ARGS) < 2:
exit("Usage: ./scripts/release/create-artemis-release-notes <version>")
version = ARGS[1]
rn_file = create_release_notes(version)
print("Release notes generated to {}".format(rn_file))