Skip to content

Commit

Permalink
Adds nexus version file (#214)
Browse files Browse the repository at this point in the history
* Adds nexus version file

* Update nexus version

* Recurse submodules

* Manually checkout submodules

* Git fetch tags for submodules

* Cleanup local submodule to generate correct tagged version

* Remove newline in nexus version ci/cd

* Also trim whitespace

* Diff manually

* Ignore whitespace in diff

* Use shorter git hash

* Updates nexus version file
  • Loading branch information
domna authored Jan 22, 2024
1 parent cdbe749 commit 1d8e625
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/check_nexus_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: nexus version check

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate nexus git version
run: |
git submodule sync --recursive
git submodule update --init --recursive --jobs=4
git submodule foreach --recursive 'git fetch --tags'
cd pynxtools/definitions
git describe --dirty --tags --long --match "*[0-9]*" > ../nexus-ref.txt
cd ../
- name: Diff
run: |
diff -w pynxtools/nexus-version.txt pynxtools/nexus-ref.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ cython_debug/
!requirements.txt
!dev-requirements.txt
!mkdocs-requirements.txt
!pynxtools/nexus-version.txt
build/
nexusparser.egg-info/PKG-INFO
.python-version
1 change: 1 addition & 0 deletions pynxtools/nexus-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v2020.10-1452-gd2fdad4f

0 comments on commit 1d8e625

Please sign in to comment.