Skip to content

Commit

Permalink
Merge pull request #385 from FAIRmat-NFDI/git-reset-in-build-step
Browse files Browse the repository at this point in the history
Git reset in build step
  • Loading branch information
lukaspie authored Jul 17, 2024
2 parents e1fdf22 + ba8e774 commit e0d3184
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check_nexus_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
git submodule update --init --recursive --jobs=4
git submodule foreach --recursive 'git fetch --tags'
cd src/pynxtools/definitions
git describe --dirty --tags --long --match "*[0-9]*" > ../nexus-ref.txt
printf "%s" "$(git describe --dirty --tags --long --abbrev=8 --match '*[0-9]*')" > ../nexus-ref.txt
cd ../
- name: Diff
run: |
diff -w src/pynxtools/nexus-version.txt src/pynxtools/nexus-ref.txt
diff src/pynxtools/nexus-version.txt src/pynxtools/nexus-ref.txt
8 changes: 6 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
git reset --hard HEAD
uv pip install build
- name: Build package
run: python -m build
run: |
git reset --hard HEAD
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions src/pynxtools/_build_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def get_vcs_version(tag_match="*[0-9]*") -> Optional[str]:
"--dirty",
"--tags",
"--long",
"--abbrev=8",
"--match",
tag_match,
],
Expand Down
2 changes: 1 addition & 1 deletion src/pynxtools/nexus-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2022.07-1278-g1d7000f4
v2022.07-1278-g1d7000f4

0 comments on commit e0d3184

Please sign in to comment.