Skip to content
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

Move sage-update-version to tools #39032

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ jobs:
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap)
- name: Bootstrap with sage-update-version
- name: Bootstrap with update-version
# We set SAGE_ROOT and SAGE_SRC by hand
# because 'sage -sh' does not work with an unconfigured tree,
# giving: Error: SAGE_SCRIPTS_DIR is set to a bad value
run: |
git config --global user.email "[email protected]"
git config --global user.name "Sage GitHub CI"
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(cat src/VERSION.txt).dev0 || echo "(ignoring error)"
SAGE_ROOT=. SAGE_SRC=./src tools/update-version $(cat src/VERSION.txt).dev0 || echo "(ignoring error)"
- name: make dist
run: |
./configure --enable-download-from-upstream-url && make dist
Expand Down
2 changes: 1 addition & 1 deletion .upstream.d/20-github.com-sagemath-sage-releases
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Upstream packages as uploaded as GitHub release assets.
# This file is automatically updated by the sage-update-version script.
# This file is automatically updated by the update-version script.
https://github.com/sagemath/sage/releases/download/10.5/
https://github.com/sagemath/sage/releases/download/10.4/
https://github.com/sagemath/sage/releases/download/10.3/
2 changes: 1 addition & 1 deletion build/pkgs/configure/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Special Update/Build Instructions
---------------------------------

This tarball is automatically generated by Sage whenever you run the
$SAGE_ROOT/bootstrap -s or the $SAGE_ROOT/src/bin/sage-update-version
$SAGE_ROOT/bootstrap -s or the $SAGE_ROOT/tools/update-version
script.
2 changes: 1 addition & 1 deletion build/pkgs/sage_conf/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sage-conf ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sage_docbuild/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sage-docbuild ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sage_setup/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sage-setup ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sage_sws2rst/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sage-sws2rst ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-standard ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_bliss/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-bliss ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_categories/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-categories ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_coxeter3/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-coxeter3 ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_environment/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-environment ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_mcqd/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-mcqd ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_meataxe/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-meataxe ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_objects/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-objects ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_repl/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-repl ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_sirocco/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-sirocco ~= 10.5rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_tdlib/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
# This file is updated on every release by the update-version script
sagemath-tdlib ~= 10.5rc1
2 changes: 1 addition & 1 deletion src/bin/sage-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# #31049: The following line is valid shell code but not valid Python code,
# which stops "setup.py develop" from rewriting it as a Python file.
:
# This file is auto-generated by the sage-update-version script, do not edit!
# This file is auto-generated by the update-version script, do not edit!
SAGE_VERSION='10.5.rc1'
SAGE_RELEASE_DATE='2024-11-23'
SAGE_VERSION_BANNER='SageMath version 10.5.rc1, Release Date: 2024-11-23'
2 changes: 1 addition & 1 deletion src/doc/en/developer/packaging_sage_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ The source directory of a distribution package, such as
in :sage_root:`src`

- ``VERSION.txt`` -- package version. This file is updated by the release manager by
running the ``sage-update-version`` script.
running the ``update-version`` script.

Sometimes it may be necessary to upload a hotfix for a distribution
package to PyPI. These should be marked by adding a suffix
Expand Down
4 changes: 2 additions & 2 deletions src/doc/en/website/versions.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is used by the version selector of the Sage doc
# and updated by the script src/bin/sage-update-version
# and updated by the script tools/update-version
#
# The lines are for recent stable releases (at most 10 lines)
# A line consists of the version and the URL to the doc
#
# The sage-update-version script adds a new line for a new stable release
# The update-version script adds a new line for a new stable release
# when run by the Sage release manager to prepare a new release
#
10.4 doc-10-4--sagemath.netlify.app
Expand Down
8 changes: 4 additions & 4 deletions src/sage/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sage version information for Python scripts
# This file is auto-generated by the sage-update-version script, do not edit!
version = '10.5.rc1'
date = '2024-11-23'
banner = 'SageMath version 10.5.rc1, Release Date: 2024-11-23'
# This file is auto-generated by the update-version script, do not edit!
version = "10.5.rc1"
date = "2024-11-23"
banner = "SageMath version 10.5.rc1, Release Date: 2024-11-23"
1 change: 0 additions & 1 deletion src/setup.cfg.m4
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ scripts =
bin/sage-run
bin/sage-run-cython
bin/sage-startuptime.py
bin/sage-update-version

[options.package_data]

Expand Down
10 changes: 10 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ Within an active virtual environment where Meson is installed, run the following
```bash
tools/update_meson.py
```

## Update Version Number

Increments the version number in the project. This command is useful when releasing a new version of the project.

Set `SAGE_ROOT` to the root directory of the Sage project and run the following command:

```bash
tools/update_version
```
10 changes: 5 additions & 5 deletions src/bin/sage-update-version → tools/update-version
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ -z "$SAGE_ROOT" ]; then
fi

if [ -z "$SAGE_SRC" ]; then
die "must be run from within a Sage environment, or with SAGE_SRC provided"
SAGE_SRC="$SAGE_ROOT/src"
fi

set -e
Expand All @@ -46,7 +46,7 @@ done
# Update version_requirements.txt for all distribution packages
( cd "$SAGE_ROOT"/build/pkgs/ && for spkg in sage*; do
if [ -f "$spkg"/version_requirements.txt -a -d "$spkg"/src ]; then
( echo "# This file is updated on every release by the sage-update-version script"
( echo "# This file is updated on every release by the update-version script"
# Normalize the package name to PyPI convention (dashes, not underscores)
if [ "$spkg" = sagelib ]; then
pkg=sagemath-standard
Expand All @@ -65,7 +65,7 @@ done
# Update Sage version file for Python in SAGE_SRC/sage
cat <<EOF > "$SAGE_SRC/sage/version.py"
# Sage version information for Python scripts
# This file is auto-generated by the sage-update-version script, do not edit!
# This file is auto-generated by the update-version script, do not edit!
version = '$SAGE_VERSION'
date = '$SAGE_RELEASE_DATE'
banner = '$SAGE_VERSION_BANNER'
Expand All @@ -78,7 +78,7 @@ cat <<EOF > "$SAGE_SRC/bin/sage-version.sh"
# #31049: The following line is valid shell code but not valid Python code,
# which stops "setup.py develop" from rewriting it as a Python file.
:
# This file is auto-generated by the sage-update-version script, do not edit!
# This file is auto-generated by the update-version script, do not edit!
SAGE_VERSION='$SAGE_VERSION'
SAGE_RELEASE_DATE='$SAGE_RELEASE_DATE'
SAGE_VERSION_BANNER='$SAGE_VERSION_BANNER'
Expand All @@ -98,7 +98,7 @@ SAGE_MINOR_VERSION=${SAGE_MINOR_VERSION//.rc*/}
) | uniq | head -n 3 > "$SAGE_ROOT/.upstream.d/20-github.com-sagemath-sage-releases.tmp"
( cat <<EOF
# Upstream packages as uploaded as GitHub release assets.
# This file is automatically updated by the sage-update-version script.
# This file is automatically updated by the update-version script.
EOF
cat "$SAGE_ROOT/.upstream.d/20-github.com-sagemath-sage-releases.tmp"
) > "$SAGE_ROOT/.upstream.d/20-github.com-sagemath-sage-releases"
Expand Down
Loading