mirror of
https://github.com/paul-nameless/tg
synced 2025-02-16 10:38:23 +00:00
Add to script brew package creation
This commit is contained in:
parent
da1f1d3514
commit
7a0e2f826e
1 changed files with 23 additions and 0 deletions
23
do
23
do
|
@ -42,6 +42,29 @@ case $ARG in
|
||||||
rm changelog.md
|
rm changelog.md
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
release-brew)
|
||||||
|
CURRENT_VERSION=$(cat tg/__init__.py | grep version | cut -d '"' -f 2)
|
||||||
|
echo Current version $CURRENT_VERSION
|
||||||
|
|
||||||
|
URL="https://github.com/paul-nameless/tg/archive/refs/tags/v$NEW_VERSION.tar.gz"
|
||||||
|
wget $URL -o /tmp/tg.tar.gz
|
||||||
|
HASH=$(sha256sum /tmp/tg.tar.gz)
|
||||||
|
rm /tmp/tg.tar.gz
|
||||||
|
|
||||||
|
cd /opt/homebrew/Library/Taps/paul-nameless/homebrew-repo
|
||||||
|
sed -i '' "6s|.*| url \"https://github.com/paul-nameless/tg/archive/refs/tags/v0.$NEW_VERSION.0.tar.gz\"|" tg.rb
|
||||||
|
sed -i '' "7s|.*| sha256 \"$HASH\"|" tg.rb
|
||||||
|
|
||||||
|
brew audit --new tg
|
||||||
|
brew uninstall tg
|
||||||
|
brew install tg
|
||||||
|
brew test tg
|
||||||
|
|
||||||
|
git add -u tg.rb
|
||||||
|
git commit -m "Release tg.rb v$NEW_VERSION"
|
||||||
|
git push origin master
|
||||||
|
;;
|
||||||
|
|
||||||
check)
|
check)
|
||||||
black .
|
black .
|
||||||
isort tg/*.py
|
isort tg/*.py
|
||||||
|
|
Loading…
Add table
Reference in a new issue