Skip to content

Commit f1d219e

Browse files
Optimize SDK validation and release tooling
1 parent bca87f9 commit f1d219e

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎.github/workflows/central-release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212
env:
1313
PYTHONDONTWRITEBYTECODE: '1'
1414
PYTHONOPTIMIZE: '0'
15-
RAIMS_JAVA_TOOLKIT_REF: 4dc550a0e55c52dd2c8c8f7662289890ae526a8d
15+
RAIMS_JAVA_TOOLKIT_REF: d1257827c06210275b9edb955fb1611fed41b4b5
1616
jobs:
1717
validateRelease:
1818
permissions:

‎.github/workflows/validate.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212
env:
1313
PYTHONDONTWRITEBYTECODE: '1'
1414
PYTHONOPTIMIZE: '0'
15-
RAIMS_JAVA_TOOLKIT_REF: 4dc550a0e55c52dd2c8c8f7662289890ae526a8d
15+
RAIMS_JAVA_TOOLKIT_REF: d1257827c06210275b9edb955fb1611fed41b4b5
1616
jobs:
1717
validateJava:
1818
name: validateJava
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
3030
with:
3131
ref: ${{ github.sha }}
32-
fetch-depth: 0
32+
fetch-depth: 1
3333
path: Raims-Java
3434
persist-credentials: false
3535
- name: Setup Python
@@ -183,7 +183,7 @@ jobs:
183183
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
184184
with:
185185
ref: ${{ github.sha }}
186-
fetch-depth: 0
186+
fetch-depth: 1
187187
path: Raims-Java
188188
persist-credentials: false
189189
- name: Setup Python

‎scripts/release.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,13 @@ def release_files(value, files, create_missing=False):
261261
require(public_download(assets[name]['browser_download_url']) == raw,
262262
'An existing release asset differs from the approved CI bytes.')
263263
missing = set(complete) - set(assets)
264-
require(not missing or create_missing, 'The approved Maven assets are missing from the GitHub release.')
264+
if not missing:
265+
return
266+
require(create_missing, 'The approved Maven assets are missing from the GitHub release.')
265267
for name in sorted(missing):
266268
upload_release_asset(value['releaseId'], name, complete[name])
267-
if missing:
268-
rows = github('releases/' + str(value['releaseId'])).get('assets', [])
269-
assets = {asset['name']: asset for asset in rows}
269+
rows = github('releases/' + str(value['releaseId'])).get('assets', [])
270+
assets = {asset['name']: asset for asset in rows}
270271
require(len(assets) == len(rows) and set(assets) == expected, 'The release asset inventory differs.')
271272
for name, raw in complete.items():
272273
require(public_download(assets[name]['browser_download_url']) == raw, 'A public release asset differs.')

0 commit comments

Comments
 (0)