From 862154d5ba6ea11f79fc10916a4fb9949f93390c Mon Sep 17 00:00:00 2001 From: Joe Kaufeld Date: Sat, 23 Jul 2022 12:05:34 -0400 Subject: [PATCH] transition to sed --- .github/workflows/build_and_release.yml | 8 ++++---- src/__init__.py | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index f81ff4b..f947208 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -23,10 +23,10 @@ jobs: # https://stackoverflow.com/a/64195658 - name: Add SHORT_SHA env property with commit short sha run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV - - name: Inject version into src.__version__ - run: echo "__version__ = '${{ env.SHORT_SHA }}'" > src/__init__.py - - name: build the sucker - run: make build + - name: Build the sucker + run: | + sed -i -e "s/?????/${{ env.SHORT_SHA }}/g" src/__init__.py + make build - uses: ncipollo/release-action@v1 with: artifacts: "utils" diff --git a/src/__init__.py b/src/__init__.py index e69de29..506aa8f 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -0,0 +1 @@ +__version__ = "?????" # will be replaced during build by CI