File: update_versions.py

package info (click to toggle)
nodejs 20.19.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 219,072 kB
  • sloc: cpp: 1,277,408; javascript: 565,332; ansic: 129,476; python: 58,536; sh: 3,841; makefile: 2,725; asm: 1,732; perl: 248; lisp: 222; xml: 42
file content (21 lines) | stat: -rwxr-xr-x 740 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3

import os
import lib.versions as update_versions
from lib.release import is_valid_tag

WORK_DIR = os.path.dirname(os.path.abspath(__file__)).replace('/tools/release', '')

ADA_VERSION_H = f'{WORK_DIR}/include/ada/ada_version.h'
DOXYGEN = f'{WORK_DIR}/doxygen'
CMAKE_LISTS = f'{WORK_DIR}/CMakeLists.txt'

NEXT_TAG = os.environ['NEXT_RELEASE_TAG']
if not NEXT_TAG or not is_valid_tag(NEXT_TAG):
    raise Exception(f'Bad environment variables. Invalid NEXT_RELEASE_TAG {NEXT_TAG}.')

NEXT_TAG = NEXT_TAG[1:]  # from v1.0.0 to 1.0.0

update_versions.update_ada_version_h(NEXT_TAG, ADA_VERSION_H)
update_versions.update_doxygen_version(NEXT_TAG, DOXYGEN)
update_versions.update_cmakelists_version(NEXT_TAG, CMAKE_LISTS)