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'
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")
dirs = [version]
- if latest:
+ if int(version) == get_latest_version():
dirs.append("latest")
for d in dirs:
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)