From 2d0222e6273be74b1f8701354b5a85ac0524883f Mon Sep 17 00:00:00 2001 From: gautamkrishnar Date: Sat, 8 May 2021 19:10:24 +0530 Subject: [PATCH] fixed brew formula generation --- .github/workflows/python.yml | 2 ++ CHANGELOG.rst | 4 ++++ publish-brew-formula.sh | 7 ++++--- socli/version.py | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index ca37af4..1538f43 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -44,4 +44,6 @@ jobs: id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - name: Publish Brew formula + env: + PUBLISHED_VERSION: ${{ steps.get_version.outputs.VERSION }} run: bash publish-brew-formula.sh # installs the latest published version and generates formula diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b158a6a..4b01cca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,10 @@ SoCLI Changelog ================ +Release 6.5 +--------------------------- +* Fixing brew formula auto deploy + Release 6.4 --------------------------- * Fixed tag name diff --git a/publish-brew-formula.sh b/publish-brew-formula.sh index 2ce9eaf..08f8461 100755 --- a/publish-brew-formula.sh +++ b/publish-brew-formula.sh @@ -1,9 +1,10 @@ # Generate formula set -e pip install homebrew-pypi-poet==0.10.0 requests==2.24.0 +echo Doing pip install --upgrade --no-cache socli="${PUBLISHED_VERSION}" # Code to wait till the latest package is available in pypi, if available do install -until pip install --upgrade --no-cache socli=="${steps.get_version.outputs.VERSION}" && [[ "$(socli --version | awk '{print $2}')" == "${steps.get_version.outputs.VERSION}" ]] && true || false +until pip install --upgrade --no-cache socli=="${PUBLISHED_VERSION}" && [[ "$(socli --version | awk '{print $2}')" == "${PUBLISHED_VERSION}" ]] && true || false do echo "Retrying again in 10 seconds..." sleep 10 @@ -58,6 +59,6 @@ cp -fv socli.rb brewroot/Formula cd brewroot git add --all echo "Committing formula..." -git commit -m "Published ${steps.get_version.outputs.VERSION}" +git commit -m "Published ${PUBLISHED_VERSION}" echo "Pushing formula..." -git push --quiet +git push --quiet \ No newline at end of file diff --git a/socli/version.py b/socli/version.py index 245374e..b850d61 100644 --- a/socli/version.py +++ b/socli/version.py @@ -1,2 +1,2 @@ -__version__ = '6.4' +__version__ = '6.5'