Skip to content

Commit 9d49ed2

Browse files
committed
generate CITATION.cff from a template
1 parent afd0acb commit 9d49ed2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CITATION.cff.in

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
title: SageMath
4+
abstract: SageMath is a free open-source mathematics software system.
5+
authors:
6+
- name: "The SageMath Developers"
7+
version: ${SAGE_VERSION}
8+
doi: 10.5281/zenodo.593563
9+
date-released: ${SAGE_RELEASE_DATE}
10+
repository-code: "https://github.com/sagemath/sage"
11+
url: "https://www.sagemath.org/"

src/bin/sage-update-version

+6
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,17 @@ echo "$SAGE_VERSION_BANNER" > "$SAGE_ROOT/VERSION.txt"
8686
# Regenerate auto-generated files tarball
8787
"$SAGE_ROOT/bootstrap" -s
8888

89+
# Create CITATION file for Zenodo-GitHub integration
90+
export SAGE_VERSION
91+
export SAGE_RELEASE_DATE
92+
envsubst <"$SAGE_ROOT/CITATION.cff.in" >"$SAGE_ROOT/CITATION.cff"
93+
8994
# Commit auto-generated changes
9095
git commit -m "Updated SageMath version to $SAGE_VERSION" -- \
9196
"$SAGE_ROOT/VERSION.txt" \
9297
"$SAGE_SRC/sage/version.py" \
9398
"$SAGE_SRC/VERSION.txt" \
99+
"$SAGE_SRC/CITATION.cff" \
94100
"$SAGE_SRC/bin/sage-version.sh" \
95101
"$SAGE_ROOT/build/pkgs/configure/checksums.ini" \
96102
"$SAGE_ROOT/build/pkgs/configure/package-version.txt" \

0 commit comments

Comments
 (0)