Skip to content

Commit

Permalink
RELEASE: 0.0.1a26
Browse files Browse the repository at this point in the history
  • Loading branch information
brucewlee committed Feb 24, 2024
1 parent d865c15 commit f35573d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
29 changes: 29 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Prompt for the new version
read -p "Enter the new version: " version

if [[ -z "$version" ]]; then
echo "Version cannot be empty"
exit 1
fi

# Update version in setup.py
sed -i '' "s/this_version='.*'/this_version='$version'/" setup.py

# Add changes to git
git add .

# Commit changes
git commit -m "RELEASE: $version"

# Push changes
git push

# Tag the release
git tag -a "$version" -m "RELEASE: $version"

# Push tags
git push --tags

echo "Release $version pushed and tagged successfully."
15 changes: 2 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
from distutils.core import setup
from setuptools import find_packages
import subprocess

def _get_version_hash():
try:
p = subprocess.Popen(["git", "describe",
"--tags", "--dirty", "--always"],
stdout=subprocess.PIPE)
except EnvironmentError:
print("Couldn't run git to get a version number for setup.py")
return None

ver = p.communicate()[0]
return ver.decode('utf-8').strip().replace('-dirty','')
this_version='0.0.1a26'

# python setup.py sdist
# python -m twine upload dist/*
Expand All @@ -21,7 +10,7 @@ def _get_version_hash():
# git push --tags
setup(
name = 'nutcracker-py',
version=_get_version_hash(),
version=this_version,
setup_requires="setupmeta",
description = 'streamline LLM evaluation',
author = 'Bruce W. Lee',
Expand Down

0 comments on commit f35573d

Please sign in to comment.