Skip to content

Commit ae69342

Browse files
tobiasdiezdimpase
authored andcommitted
Move sage-update-version to tools
1 parent 871ba9d commit ae69342

File tree

8 files changed

+21
-13
lines changed

8 files changed

+21
-13
lines changed

.github/workflows/ci-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ jobs:
8484
run: |
8585
sudo DEBIAN_FRONTEND=noninteractive apt-get update
8686
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap)
87-
- name: Bootstrap with sage-update-version
87+
- name: Bootstrap with update-version
8888
# We set SAGE_ROOT and SAGE_SRC by hand
8989
# because 'sage -sh' does not work with an unconfigured tree,
9090
# giving: Error: SAGE_SCRIPTS_DIR is set to a bad value
9191
run: |
9292
git config --global user.email "[email protected]"
9393
git config --global user.name "Sage GitHub CI"
94-
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(cat src/VERSION.txt).dev0 || echo "(ignoring error)"
94+
SAGE_ROOT=. SAGE_SRC=./src tools/update-version $(cat src/VERSION.txt).dev0 || echo "(ignoring error)"
9595
- name: make dist
9696
run: |
9797
./configure --enable-download-from-upstream-url && make dist

.upstream.d/20-github.com-sagemath-sage-releases

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
# This file is automatically updated by the sage-update-version script.
33
https://github.com/sagemath/sage/releases/download/10.7/
44
https://github.com/sagemath/sage/releases/download/10.6/
5-
https://github.com/sagemath/sage/releases/download/10.5/

build/pkgs/configure/SPKG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ Special Update/Build Instructions
2424
---------------------------------
2525

2626
This tarball is automatically generated by Sage whenever you run the
27-
$SAGE_ROOT/bootstrap -s or the $SAGE_ROOT/src/bin/sage-update-version
27+
$SAGE_ROOT/bootstrap -s or the $SAGE_ROOT/tools/update-version
2828
script.

src/doc/en/developer/packaging_sage_library.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ The source directory of a distribution package, such as
186186
in :sage_root:`src`
187187

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

191191
Sometimes it may be necessary to upload a hotfix for a distribution
192192
package to PyPI. These should be marked by adding a suffix

src/doc/en/website/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This file is used by the version selector of the Sage doc
2-
# and updated by the script src/bin/sage-update-version
2+
# and updated by the script tools/update-version
33
#
44
# The lines are for recent stable releases (at most 10 lines)
55
# A line consists of the version and the URL to the doc
66
#
7-
# The sage-update-version script adds a new line for a new stable release
7+
# The update-version script adds a new line for a new stable release
88
# when run by the Sage release manager to prepare a new release
99
#
1010
10.6 doc-10-6--sagemath.netlify.app

src/setup.cfg.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ scripts =
8686
bin/sage-run
8787
bin/sage-run-cython
8888
bin/sage-startuptime.py
89-
bin/sage-update-version
9089

9190
[options.package_data]
9291

tools/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@ Within an active virtual environment where Meson is installed, run the following
2727
```bash
2828
tools/update-meson.py
2929
```
30+
31+
## Update Version Number
32+
33+
Increments the version number in the project. This command is useful when releasing a new version of the project.
34+
35+
Set `SAGE_ROOT` to the root directory of the Sage project and run the following command:
36+
37+
```bash
38+
tools/update_version
39+
```

src/bin/sage-update-version renamed to tools/update-version

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if [ -z "$SAGE_ROOT" ]; then
2626
fi
2727

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

3232
set -e
@@ -46,7 +46,7 @@ done
4646
# Update version_requirements.txt for all distribution packages
4747
( cd "$SAGE_ROOT"/build/pkgs/ && for spkg in sage*; do
4848
if [ -f "$spkg"/version_requirements.txt -a -d "$spkg"/src ]; then
49-
( echo "# This file is updated on every release by the sage-update-version script"
49+
( echo "# This file is updated on every release by the update-version script"
5050
# Normalize the package name to PyPI convention (dashes, not underscores)
5151
if [ "$spkg" = sagelib ]; then
5252
pkg=sagemath-standard
@@ -65,7 +65,7 @@ done
6565
# Update Sage version file for Python in SAGE_SRC/sage
6666
cat <<EOF > "$SAGE_SRC/sage/version.py"
6767
# Sage version information for Python scripts
68-
# This file is auto-generated by the sage-update-version script, do not edit!
68+
# This file is auto-generated by the update-version script, do not edit!
6969
version = '$SAGE_VERSION'
7070
date = '$SAGE_RELEASE_DATE'
7171
banner = '$SAGE_VERSION_BANNER'
@@ -78,7 +78,7 @@ cat <<EOF > "$SAGE_SRC/bin/sage-version.sh"
7878
# #31049: The following line is valid shell code but not valid Python code,
7979
# which stops "setup.py develop" from rewriting it as a Python file.
8080
:
81-
# This file is auto-generated by the sage-update-version script, do not edit!
81+
# This file is auto-generated by the update-version script, do not edit!
8282
SAGE_VERSION='$SAGE_VERSION'
8383
SAGE_RELEASE_DATE='$SAGE_RELEASE_DATE'
8484
SAGE_VERSION_BANNER='$SAGE_VERSION_BANNER'
@@ -98,7 +98,7 @@ SAGE_MINOR_VERSION=${SAGE_MINOR_VERSION//.rc*/}
9898
) | uniq | head -n 3 > "$SAGE_ROOT/.upstream.d/20-github.com-sagemath-sage-releases.tmp"
9999
( cat <<EOF
100100
# Upstream packages as uploaded as GitHub release assets.
101-
# This file is automatically updated by the sage-update-version script.
101+
# This file is automatically updated by the update-version script.
102102
EOF
103103
cat "$SAGE_ROOT/.upstream.d/20-github.com-sagemath-sage-releases.tmp"
104104
) > "$SAGE_ROOT/.upstream.d/20-github.com-sagemath-sage-releases"

0 commit comments

Comments
 (0)