summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-04-05 09:30:22 +0000
committerLars Wirzenius <liw@liw.fi>2021-04-05 09:30:22 +0000
commit8e5fb1a81973b73b750a724dd0e91479fd2d6c52 (patch)
tree4b08280327c2c88abf8e2018dba977e0a81e03a3
parent3fdb7d8023bb336c13a94f6c08260fa3649dc6bc (diff)
parentb3ed45621fb981d67e7352b7b73b0b4f325d0d6a (diff)
downloadbumper-rs-8e5fb1a81973b73b750a724dd0e91479fd2d6c52.tar.gz
Merge branch 'cleanups' into 'main'
Cleanups See merge request larswirzenius/bumper!12
-rw-r--r--README.md23
-rw-r--r--bumper.md21
-rw-r--r--src/bin/toml.rs20
3 files changed, 29 insertions, 35 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5acd0e5
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
+# Bumper &ndash; set version number for a software project
+
+Bumper sets the version number in the right places for a software
+project. For more details on goals, requirements, and
+implementation details, see the [bumper.md](bumper.md) subplot file,
+rendered online at <https://bumper.liw.fi/>.
+
+## Legalese
+
+Copyright 2021 Lars Wirzenius
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/bumper.md b/bumper.md
index cebc1fb..a77a26f 100644
--- a/bumper.md
+++ b/bumper.md
@@ -2,18 +2,14 @@
Bumper is a small utility for updating the version number when making
a release of a software project. It updates the version number in the
-various locations in which it is stored in the source tree, creates a
-git tag for indicating the release, then updates the source tree again
-with a version number that indicates an unreleased version.
+various locations in which it is stored in the source tree, commits
+those changes, and creates a git tag for indicating the release.
The tool is used like this:
~~~{.numberLines}
$ cd ~/my-project
$ bumper 1.2.0
-Rust project my-project version set to 1.2.0
-Debian package version set to 1.2.0-1
-Release tagged as v1.2.0
$ git push --tags
...
$
@@ -22,8 +18,8 @@ $
In other words: you run Bumper and tell it the version of the release
you're making. Bumper sniffs out what kind of project it is, and sets
the version number in the right places. It then creates a git tag for
-that release. It's up to you to push the changes and tag, or to build
-the release: Bumper only makes local changes.
+that release. It's up to you to push the changes and tag to a git
+server, and to build the release: Bumper only makes local changes.
# Overview
@@ -38,17 +34,12 @@ tree, to keep things simple.
supported, since the author uses nothing else. (If you would like
support for other systems, please help.)
-* Python projects store the version number in a file `version.py` in a
- subdirectory. The project build system uses that file as the source
- of the version number.
-
* Rust projects store the version number in the `Cargo.toml` file. The
build system gets it from there.
* Debian packages have a `debian/changelog`, which specifies the
- package's version number.
-
-* Release notes are in a markdown file called `NEWS`.
+ package's version number. Bumper assumes the file is otherwise up to
+ date for the release, and sets the version to `X.Y.Z-1`.
* Releases are marked with signed, annotated git tags named after the
release version with a `v` prefix.
diff --git a/src/bin/toml.rs b/src/bin/toml.rs
deleted file mode 100644
index f796057..0000000
--- a/src/bin/toml.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-use cargo_edit::Manifest;
-use toml_edit::{Item, Value};
-
-fn main() {
- let mut m = Manifest::open(&None).unwrap();
- let package = m
- .get_table(&[String::from("package")])
- .unwrap()
- .as_table_mut()
- .unwrap();
- // println!("package: {:?}", package);
-
- let version = package.entry("version");
- *version = Item::Value(Value::from("1.2"));
- println!("version: {:?}", version);
-
- let mut f = Manifest::find_file(&None).unwrap();
- println!("file: {:?}", f);
- m.write_to_file(&mut f).unwrap();
-}