@@ -53,12 +53,26 @@ def analyze_file(file, lineno, commits_and_tags, dry_run=False):
53
53
print (f"\t first tag was { first_tag } " )
54
54
commits_and_tags [line_sha ] = first_tag
55
55
if not dry_run :
56
+ since_version = first_tag .replace ("jenkins-" , "" )
56
57
update_file (
57
58
file ,
58
59
int (lineno ),
59
60
"@since TODO" ,
60
- "@since " + first_tag . replace ( "jenkins-" , "" ) ,
61
+ f "@since { since_version } " ,
61
62
)
63
+ update_file (
64
+ file ,
65
+ int (lineno ),
66
+ '@Deprecated(since = "TODO")' ,
67
+ f'@Deprecated(since = "{ since_version } ")' ,
68
+ )
69
+ update_file (
70
+ file ,
71
+ int (lineno ),
72
+ '@RestrictedSince("TODO")' ,
73
+ f'@RestrictedSince("{ since_version } ")' ,
74
+ )
75
+
62
76
else :
63
77
print (
64
78
"\t Not updating file, no tag found. "
@@ -78,7 +92,8 @@ def analyze_files(commits_and_tags, dry_run=False):
78
92
GIT ,
79
93
"grep" ,
80
94
"--line-number" ,
81
- "@since TODO" ,
95
+ "-E" ,
96
+ '@since TODO|@Deprecated\\ (since = "TODO"\\ )|@RestrictedSince\\ ("TODO"\\ )' ,
82
97
"--" ,
83
98
"*.java" ,
84
99
"*.jelly" ,
@@ -111,12 +126,14 @@ def display_results(commits_and_tags):
111
126
112
127
def main ():
113
128
"""
114
- Update '@since TODO' entries with actual Jenkins release versions.
129
+ Update '@since TODO', '@Deprecated(since = "TODO")', and '@RestrictedSince("TODO")' entries
130
+ with actual Jenkins release versions.
115
131
116
132
This script is a developer tool, to be used by maintainers.
117
133
"""
118
134
parser = argparse .ArgumentParser (
119
- description = "Update '@since TODO' entries with actual Jenkins release versions."
135
+ description = "Update '@since TODO', '@Deprecated(since = \" TODO\" )', and '@RestrictedSince(\" TODO\" )' entries "
136
+ "with actual Jenkins release versions. "
120
137
)
121
138
parser .add_argument ("-n" , "--dry-run" , help = "Dry run" , action = "store_true" )
122
139
args = parser .parse_args ()
0 commit comments