Skip to content

fixed pypi #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,34 @@ jobs:
id: beta_version
run: |
# Read current version from setup.py
CURRENT_VERSION=$(grep -o '__version__ = "[^"]*"' setup.py | cut -d"" -f2)
CURRENT_VERSION=$(grep -o '__version__ = "[^"]*"' setup.py | sed 's/__version__ = "\(.*\)"/\1/')
echo "Current version in files: $CURRENT_VERSION"

# Split version into components
IFS='.' read -r MAJOR MINOR PATCH_FULL <<< "$CURRENT_VERSION"
IFS='.' read -r MAJOR MINOR PATCH_FULL <<< "$CURRENT_VERSION" || true

# Validate we got valid version components
if [[ -z "$MAJOR" || -z "$MINOR" || -z "$PATCH_FULL" ]]; then
echo "Error: Could not parse version components from $CURRENT_VERSION"
echo "Using default version 0.0.1b1"
MAJOR=0
MINOR=0
PATCH_FULL=1
fi

# Handle beta suffix if it exists
if [[ $PATCH_FULL == *b* ]]; then
# Extract the numeric part before 'b'
PATCH_NUM=${PATCH_FULL%%b*}
# Extract the beta number and increment it
BETA_NUM=${PATCH_FULL#*b}
BETA_NUM=$((BETA_NUM + 1))
# Ensure beta number is a valid integer
if ! [[ $BETA_NUM =~ ^[0-9]+$ ]]; then
echo "Warning: Invalid beta number format. Resetting to beta1."
BETA_NUM=1
else
BETA_NUM=$((BETA_NUM + 1))
fi
else
# If not already a beta, use the patch number and start with beta1
PATCH_NUM=$PATCH_FULL
Expand Down
2 changes: 1 addition & 1 deletion datafog/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.1.0b4"
__version__ = "4.1.0b5"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
long_description = f.read()

# Use a single source of truth for the version
__version__ = "4.1.0b4"
__version__ = "4.1.0b5"

project_urls = {
"Homepage": "https://datafog.ai",
Expand Down