Skip to content

Commit

Permalink
fixed brew formula generation
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamkrishnar committed May 8, 2021
1 parent 0d953a6 commit 2d0222e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
SoCLI Changelog
================

Release 6.5
---------------------------
* Fixing brew formula auto deploy

Release 6.4
---------------------------
* Fixed tag name
Expand Down
7 changes: 4 additions & 3 deletions publish-brew-formula.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion socli/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '6.4'
__version__ = '6.5'

0 comments on commit 2d0222e

Please sign in to comment.