Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19468976.svg)](https://doi.org/10.5281/zenodo.19468976)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-0.4.2-blue.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases)
[![Version](https://img.shields.io/badge/version-0.4.3.dev1-blue.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases)
[![Python 3.11--3.12](https://img.shields.io/badge/python-3.11--3.12-blue.svg)](https://www.python.org/downloads/)
[![CI (build)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/actions/workflows/ci.yml/badge.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/actions/workflows/ci.yml)
[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
Expand Down
13 changes: 9 additions & 4 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@
],
"codeRepository": "https://github.com/SoftwareUnderstanding/sw-metadata-bot",
"dateCreated": "2025-12-15",
"dateModified": "2026-04-27",
"dateModified": "2026-04-29",
"datePublished": "2026-01-16",
"description": "A repository to keep the code of the RSMetaCheck bot for pushing issues with existing repository metadata",
"downloadUrl": "https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases",
"keywords": ["codemeta", "bot", "software", "metadata"],
"keywords": [
"codemeta",
"bot",
"software",
"metadata"
],
"license": "https://spdx.org/licenses/MIT",
"name": "sw-metadata-bot",
"programmingLanguage": [
Expand All @@ -40,12 +45,12 @@
"python-dotenv>=1.0.0",
"requests>=2.32.5"
],
"version": "0.4.2",
"version": "0.4.3.dev1",
"codemeta:contIntegration": {
"@id": "https://raw.githubusercontent.com/SoftwareUnderstanding/sw-metadata-bot/main/.github/workflows/ci.yml"
},
"continuousIntegration": "https://raw.githubusercontent.com/SoftwareUnderstanding/sw-metadata-bot/main/.github/workflows/ci.yml",
"developmentStatus": "active",
"issueTracker": "https://github.com/SoftwareUnderstanding/sw-metadata-bot/issues",
"@type": "SoftwareSourceCode"
}
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "sw-metadata-bot"
version = "0.4.2"
version = "0.4.3.dev1"
description = "Metadata quality bot for software repositories, leveraging metacheck for analysis and GitHub/GitLab APIs for issue management."
readme = "README.md"
requires-python = ">=3.11,<3.13"
Expand Down
151 changes: 0 additions & 151 deletions tools/release/update_version_package.py

This file was deleted.

37 changes: 25 additions & 12 deletions update_version_package.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
#!/bin/sh
# Before running this script, please use `uv version --bump <part>` to bump the version, which will automatically update the version in pyproject.toml and uv.lock.

# This script updates the version
# Usage: ./update_version_package.sh patch|minor|major
# return error if no argument is provided
if [ -z "$1" ]; then
echo "Error: No version type provided. Please specify 'patch', 'minor', or 'major'."
exit 1
fi
# This script aims to replace the version in metadata files with the version from uv.
# It also updates the dateModified field in codemeta.json and the version badge in README.md.
# Finally, it commits the changes to git.

# update files
uv run python tools/release/update_version_package.py $1
## Currently handles:
# - codemeta.json: updates the version and dateModified fields
# - README.md: updates the version badge

NEW_VERSION=$(uv version | cut -d' ' -f2)
TODAY=$(date +%Y-%m-%d)

# Update codemeta.json
uv run python -c "
import json
with open('codemeta.json', 'r') as f:
data = json.load(f)
data['version'] = '$NEW_VERSION'
data['dateModified'] = '$TODAY'
with open('codemeta.json', 'w') as f:
json.dump(data, f, indent=2)
"

# Update README.md
sed -i "s|badge/version-[^)]*-|badge/version-$NEW_VERSION-|g" README.md

# update the uv.lock file
uv sync

# retrieve new version
NEW_VERSION=$(uv run python -c "from importlib.metadata import version; print(version('sw-metadata-bot'))")
echo "Updated version to $NEW_VERSION"
# commit the changes
git add pyproject.toml codemeta.json uv.lock README.md
git commit -m "Update version to $NEW_VERSION"
git commit -m "Bump version to $NEW_VERSION"
Loading
Loading