Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lelandaisb authored Jul 16, 2023
1 parent beca553 commit 266886c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/list-versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# Used in CI when a new is release is creted to comment it.
def listVersions(source_path):
recipes = glob.glob(source_path + '/**/package.py', recursive=True)
with open(source_path + '/recipes.md', 'w') as md:
file_name = source_path + '/recipes.md'
with open(file_name, 'w') as md:
md.write('**Below the last version of products contained in Spack recipes for this release.**\n')
md.write('| Product | Version |\n')
md.write('| ------- | ------- |\n')
Expand All @@ -19,6 +20,7 @@ def listVersions(source_path):
version = re.search("version\([\'\"]([0-9]+(\.[0-9]+)*)[\'\"]", line)
version_name = 'undefined' if version is None else version.group(1)
md.write('| ' + product_name + ' | ' + version_name + ' |\n')
print("File created:", file_name)

if __name__ == "__main__":
project_path = sys.argv[1]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Create a release
uses: softprops/action-gh-release@v1
with:
body_path: $GITHUB_WORKSPACE/recipes.md
body_path: ${{ github.workspace }}/recipes.md
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ github.token }}
Expand Down

0 comments on commit 266886c

Please sign in to comment.