From b381dcc28e7d6c984a0aa3a6d8a8a6b02e1cf4f3 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 3 Sep 2024 10:11:38 -0500 Subject: [PATCH 1/7] Update update-version-number.yaml testing --- .github/workflows/update-version-number.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update-version-number.yaml b/.github/workflows/update-version-number.yaml index 4a66207..c5ac7aa 100644 --- a/.github/workflows/update-version-number.yaml +++ b/.github/workflows/update-version-number.yaml @@ -4,6 +4,8 @@ name: Update Version number push: tags: - "v[0-9]+.[0-9]+.[0-9]+" + workflow_dispatch: + jobs: run: runs-on: ubuntu-latest @@ -16,6 +18,7 @@ jobs: run: | git config user.name nanos-bot git config user.email bot@thms.uk + - uses: mxschmitt/action-tmate@v3 - name: Update version number run: | VERSION=${{ github.ref_name }} From a1fc9e6ca521d9932bce8593e649e6007a9285dd Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 3 Sep 2024 10:26:22 -0500 Subject: [PATCH 2/7] Update update-version-number.yaml 1 --- .github/workflows/update-version-number.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-version-number.yaml b/.github/workflows/update-version-number.yaml index c5ac7aa..90b401e 100644 --- a/.github/workflows/update-version-number.yaml +++ b/.github/workflows/update-version-number.yaml @@ -23,7 +23,7 @@ jobs: run: | VERSION=${{ github.ref_name }} VERSION="${VERSION:1}" - sed -i '' -E 's/VERSION = "[0-9]+.[0-9]+.[0-9]+"/VERSION = "'$VERSION'"/' find_posts.py + sed -i -E 's/VERSION = ".*?"/VERSION = '$VERSION'/g' find_posts.py git add find_posts.py git commit -m "[bot] Bump version to $VERSION" - name: Push to repository From 07632800734b30e0fb822c7ed6c1f2ff886349d1 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 3 Sep 2024 10:29:17 -0500 Subject: [PATCH 3/7] Update update-version-number.yaml --- .github/workflows/update-version-number.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-version-number.yaml b/.github/workflows/update-version-number.yaml index 90b401e..d9d34b7 100644 --- a/.github/workflows/update-version-number.yaml +++ b/.github/workflows/update-version-number.yaml @@ -18,7 +18,7 @@ jobs: run: | git config user.name nanos-bot git config user.email bot@thms.uk - - uses: mxschmitt/action-tmate@v3 + #- uses: mxschmitt/action-tmate@v3 - name: Update version number run: | VERSION=${{ github.ref_name }} From d2c3067eb2d8e6a157a6212177e5262819a52392 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 3 Sep 2024 11:03:23 -0500 Subject: [PATCH 4/7] Update update-version-number.yaml updates sed --- .github/workflows/update-version-number.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-version-number.yaml b/.github/workflows/update-version-number.yaml index d9d34b7..9ce8a8a 100644 --- a/.github/workflows/update-version-number.yaml +++ b/.github/workflows/update-version-number.yaml @@ -23,7 +23,7 @@ jobs: run: | VERSION=${{ github.ref_name }} VERSION="${VERSION:1}" - sed -i -E 's/VERSION = ".*?"/VERSION = '$VERSION'/g' find_posts.py + sed -i -E 's/VERSION = ".*?"/VERSION = "'$VERSION'"/g' find_posts.py git add find_posts.py git commit -m "[bot] Bump version to $VERSION" - name: Push to repository From 725735eb0aba6eb5bb2fdb91d15d618570707d3c Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 3 Sep 2024 11:04:40 -0500 Subject: [PATCH 5/7] Update update-version-number.yaml now only matches if VERSION is at the start of the line --- .github/workflows/update-version-number.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-version-number.yaml b/.github/workflows/update-version-number.yaml index 9ce8a8a..c7da062 100644 --- a/.github/workflows/update-version-number.yaml +++ b/.github/workflows/update-version-number.yaml @@ -23,7 +23,7 @@ jobs: run: | VERSION=${{ github.ref_name }} VERSION="${VERSION:1}" - sed -i -E 's/VERSION = ".*?"/VERSION = "'$VERSION'"/g' find_posts.py + sed -i -E 's/^VERSION = ".*?"/VERSION = "'$VERSION'"/g' find_posts.py git add find_posts.py git commit -m "[bot] Bump version to $VERSION" - name: Push to repository From 3d7f09b8abc886fff0b891dbc5d61da1a2fd9a6b Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Wed, 4 Sep 2024 07:06:32 +0000 Subject: [PATCH 6/7] Revert regex --- .github/workflows/update-version-number.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-version-number.yaml b/.github/workflows/update-version-number.yaml index c7da062..20fe992 100644 --- a/.github/workflows/update-version-number.yaml +++ b/.github/workflows/update-version-number.yaml @@ -23,7 +23,7 @@ jobs: run: | VERSION=${{ github.ref_name }} VERSION="${VERSION:1}" - sed -i -E 's/^VERSION = ".*?"/VERSION = "'$VERSION'"/g' find_posts.py + sed -i -E 's/^VERSION = "[0-9]+.[0-9]+.[0-9]+"/VERSION = "'$VERSION'"/' find_posts.py git add find_posts.py git commit -m "[bot] Bump version to $VERSION" - name: Push to repository From f643c071f04848e4488fce18c2d829396eca768f Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Wed, 4 Sep 2024 07:07:52 +0000 Subject: [PATCH 7/7] remove ^ --- .github/workflows/update-version-number.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-version-number.yaml b/.github/workflows/update-version-number.yaml index 20fe992..92b1edc 100644 --- a/.github/workflows/update-version-number.yaml +++ b/.github/workflows/update-version-number.yaml @@ -23,7 +23,7 @@ jobs: run: | VERSION=${{ github.ref_name }} VERSION="${VERSION:1}" - sed -i -E 's/^VERSION = "[0-9]+.[0-9]+.[0-9]+"/VERSION = "'$VERSION'"/' find_posts.py + sed -i -E 's/VERSION = "[0-9]+.[0-9]+.[0-9]+"/VERSION = "'$VERSION'"/' find_posts.py git add find_posts.py git commit -m "[bot] Bump version to $VERSION" - name: Push to repository