You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
core.setFailed(`Git tag "${tag}" is not a valid semver version`);
49
+
setFailed(`Git tag "${tag}" is not a valid semver version`);
47
50
process.exit();
48
51
}
49
52
@@ -112,7 +115,7 @@ function getVersionChangeLog(lines) {
112
115
113
116
// Enforce that the changelog is not empty if we are on the master branch
114
117
if(isGitTag&&emptyChangelog){
115
-
core.setFailed('File "CHANGELOG.md" is empty, this must be populated in the master branch');
118
+
setFailed('File "CHANGELOG.md" is empty, this must be populated in the master branch');
116
119
process.exit();
117
120
}
118
121
@@ -122,36 +125,47 @@ function getVersionChangeLog(lines) {
122
125
123
126
// Simple validation of the changelog
124
127
if(!lines[0].startsWith('# Version ')){
125
-
core.setFailed('File "CHANGELOG.md" must start with "# Version <version>" followed by a changelog entry');
128
+
setFailed(
129
+
'File "CHANGELOG.md" must start with "# Version <version>" followed by a changelog entry'
130
+
);
126
131
process.exit();
127
132
}
128
133
129
134
// Get the start of the entry
130
135
constchangeLogBegin=lines.findIndex((line)=>line.startsWith(`# Version ${currentVersion}`));
131
136
if(isGitTag&&changeLogBegin===-1){
132
-
core.setFailed(`File "CHANGELOG.md" does not contain a changelog entry for version "${currentVersion}", this must be added in the master branch`);
137
+
setFailed(
138
+
`File "CHANGELOG.md" does not contain a changelog entry for version "${currentVersion}", this must be added in the master branch`
139
+
);
133
140
process.exit();
134
141
}
135
142
136
143
// Enforce that the changelog entry is at the top of the file if we are on the master branch
137
144
if(isGitTag&&changeLogBegin!==0){
138
-
core.setFailed(`Changelog entry for version "${currentVersion}" is not at the top of the file, you tag is either out of date or you have not updated the changelog`);
145
+
setFailed(
146
+
`Changelog entry for version "${currentVersion}" is not at the top of the file, you tag is either out of date or you have not updated the changelog`
147
+
);
139
148
process.exit();
140
149
}
141
150
142
151
// Get the end of the entry
143
-
letchangeLogEnd=lines.slice(changeLogBegin+1).findIndex((line)=>line.startsWith('# Version '));
152
+
letchangeLogEnd=lines
153
+
.slice(changeLogBegin+1)
154
+
.findIndex((line)=>line.startsWith('# Version '));
0 commit comments