mirror of
https://github.com/systemd/systemd.git
synced 2025-02-27 01:57:35 +03:00
doc-sync: automatically detect whether we're updating the latest version
also update the release instructions to push release candidates to -stable
This commit is contained in:
parent
75481bebc1
commit
00fc4a3945
@ -23,5 +23,6 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
14. "Draft" a new release on github (https://github.com/systemd/systemd/releases/new), mark "This is a pre-release" if appropriate.
|
||||
15. Check that announcement to systemd-devel, with a copy&paste from NEWS, was sent. This should happen automatically.
|
||||
16. Update IRC topic (`/msg chanserv TOPIC #systemd Version NNN released`)
|
||||
17. [FINAL] Push commits to stable, create an empty -stable branch: `git push systemd-stable --atomic origin/main:main origin/main:refs/heads/${version}-stable`, and change the default branch to latest release (https://github.com/systemd/systemd-stable/settings/branches).
|
||||
18. [FINAL] Change the Github Pages branch in the stable repository to the newly created branch (https://github.com/systemd/systemd-stable/settings/pages) and set the 'Custom domain' to 'systemd.io'
|
||||
17. Push commits to stable, create an empty -stable branch: `git push systemd-stable --atomic origin/main:main origin/main:refs/heads/${version}-stable`.
|
||||
18. [FINAL] Change the default branch to latest release (https://github.com/systemd/systemd-stable/settings/branches).
|
||||
19. [FINAL] Change the Github Pages branch in the stable repository to the newly created branch (https://github.com/systemd/systemd-stable/settings/pages) and set the 'Custom domain' to 'systemd.io'
|
||||
|
@ -81,7 +81,17 @@ def update_index_file(version, index_filename):
|
||||
json.dump(index, f)
|
||||
|
||||
|
||||
def main(version, directory, www_target, latest):
|
||||
def get_latest_version():
|
||||
tags = subprocess.check_output(["git", "tag", "-l", "v*"], text=True).split()
|
||||
versions = []
|
||||
for tag in tags:
|
||||
m = re.match("v?(\d+).*", tag)
|
||||
if m:
|
||||
versions.append(int(m.group(1)))
|
||||
return max(versions)
|
||||
|
||||
|
||||
def main(version, directory, www_target):
|
||||
index_filename = os.path.join(directory, "index.json")
|
||||
nav_filename = os.path.join(directory, "nav.js")
|
||||
|
||||
@ -95,7 +105,7 @@ def main(version, directory, www_target, latest):
|
||||
|
||||
dirs = [version]
|
||||
|
||||
if latest:
|
||||
if int(version) == get_latest_version():
|
||||
dirs.append("latest")
|
||||
|
||||
for d in dirs:
|
||||
@ -126,9 +136,8 @@ def main(version, directory, www_target, latest):
|
||||
if __name__ == "__main__":
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument("--version", required=True)
|
||||
parser.add_argument("--no-latest", dest="latest", action="store_false")
|
||||
parser.add_argument("directory")
|
||||
parser.add_argument("www_target")
|
||||
|
||||
args = parser.parse_args()
|
||||
main(args.version, args.directory, args.www_target, args.latest)
|
||||
main(args.version, args.directory, args.www_target)
|
||||
|
Loading…
x
Reference in New Issue
Block a user