| #!/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 Console {version} Release Notes |
| title-class: page-title-artemis |
| type: artemis |
| --- |
| |
| {release_notes} |
| |
| """ |
| |
| def create_release_notes(version): |
| output_path = "src/components/artemis-console/download/release-notes-{}.md".format(version) |
| |
| jira_version = "console-{}".format(version) |
| release_notes = render_release_notes("artemis", jira_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-console-release-notes <version>") |
| |
| version = ARGS[1] |
| rn_file = create_release_notes(version) |
| |
| print("Release notes generated to {}".format(rn_file)) |