Skip to content

Commit 353e469

Browse files
committed
Incorporated review comments.
1 parent f26dd81 commit 353e469

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.github/workflows/check_latest_release.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,20 @@ jobs:
2929
- name: checkout repository
3030
uses: actions/checkout@v3
3131

32-
- name: Extract module name and version from release tag
33-
id: extract_tag
32+
- name: Extract module name, version, and run examples using PyPI uploads
33+
id: extract_and_run
3434
run: |
3535
# Extract module name and version from the release tag
3636
# Assuming the tag format is <module_name>-<version>, e.g., nidigital-1.4.0
3737
TAG="${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.event.release.tag_name }}"
3838
MODULE_NAME=$(echo "$TAG" | cut -d'-' -f1)
3939
MODULE_VERSION=$(echo "$TAG" | cut -d'-' -f2-)
40+
echo "Module Name: $MODULE_NAME"
41+
echo "Module Version: $MODULE_VERSION"
4042
41-
- name: run examples using PyPI uploads
42-
uses: ./.github/actions/run_examples_using_pypi_uploads
43-
with:
44-
module_name: ${{ env.module_name }}
45-
module_version: ${{ env.module_version }}
43+
# Export module name and version as environment variables
44+
echo "module_name=$MODULE_NAME" >> $GITHUB_ENV
45+
echo "module_version=$MODULE_VERSION" >> $GITHUB_ENV
46+
47+
# Run examples using PyPI uploads
48+
python ./.github/actions/run_examples_using_pypi_uploads.py --module-name "$MODULE_NAME" --module-version "$MODULE_VERSION"

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,7 @@ Release Process
153153
* If you need to upgrade the major or minor versions, include any of the following parameters:
154154
* --increment-major-version - To increment the major version of package. This will update the version to (N+1).X.X.dev0
155155
* --increment-minor-version - To increment the minor version of package. This will update the version to X.(N+1).X.dev0
156-
For example:
157-
```bash
158-
python3 tools/build_release.py --increment-minor-version
159-
```
156+
* Example: `python3 tools/build_release.py --increment-minor-version`
160157
* If you need to update the version for any specific driver(s), include the `drivers` parameter. By default, all drivers will be considered.
161158
For example:
162159
```bash

build/templates/examples.rst.mako

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
# Check if the module name and version match the old tag formatting criteria
3535
use_old_tag_format = (
3636
module_name in ['nidcpower', 'nidigital', 'nidmm', 'nifake', 'niswitch', 'nimodinst', 'nifgen', 'niscope', 'nise', 'nitclk']
37-
and v.major <= 1 and v.minor <= 4 and v.micro <= 9
37+
and latest_release_version == '1.4.9'
3838
)
3939
40-
if use_old_tag_format:
41-
released_zip_url = 'https://github.com/ni/nimi-python/releases/download/v{}/{}_examples.zip'.format(latest_release_version, module_name)
42-
else:
43-
released_zip_url = 'https://github.com/ni/nimi-python/releases/download/{}-{}/{}_examples.zip'.format(module_name, latest_release_version, module_name)
40+
if not use_old_tag_format:
41+
latest_release_version = module_name + '-' + latest_release_version
42+
43+
released_zip_url = 'https://github.com/ni/nimi-python/releases/download/{}/{}_examples.zip'.format(latest_release_version, module_name)
4444
4545
example_url_base = 'https://github.com/ni/nimi-python/blob/'
4646

0 commit comments

Comments
 (0)