mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-07 14:54:33 +08:00
Compare commits
1 Commits
improve-ve
...
make-prefi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fd87c86da |
17
README.md
17
README.md
@@ -383,23 +383,6 @@ sudo /usr/bin/grub-btrfsd /.snapshots --verbose` (for snapper)
|
|||||||
Or pass `--verbose` to the daemon using the Systemd .service-file or the OpenRC conf.d file respectively. (see Daemon installation instructions how to do that)
|
Or pass `--verbose` to the daemon using the Systemd .service-file or the OpenRC conf.d file respectively. (see Daemon installation instructions how to do that)
|
||||||
|
|
||||||
- - -
|
- - -
|
||||||
### Development
|
|
||||||
Grub-btrfs uses a rudimentary system of automatic versioning to tell apart different commits. This is helpful when users report problems and it is not immediately clear what version they are using.
|
|
||||||
We therefore have the following script in `.git/hooks/pre-commit`:
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo "Doing pre commit hook with version bump"
|
|
||||||
version="$(git describe --tags --abbrev=0)-$(git rev-parse --abbrev-ref HEAD)-$(date -u -Iseconds)"
|
|
||||||
echo "New version is ${version}"
|
|
||||||
sed -i "s/GRUB_BTRFS_VERSION=.*/GRUB_BTRFS_VERSION=${version}/" config
|
|
||||||
git add config
|
|
||||||
```
|
|
||||||
|
|
||||||
This automatically sets the version in the `config`-file to `[lasttag]-[branch-name]-[current-date-in-UTC]`.
|
|
||||||
In order to create a Tag we don't want to have this long version. In this case we set the version manually in `config` and commit with `git commit --no-verify`. This avoids running the hook.
|
|
||||||
|
|
||||||
### Special thanks for assistance and contributions
|
### Special thanks for assistance and contributions
|
||||||
* [Maxim Baz](https://github.com/maximbaz)
|
* [Maxim Baz](https://github.com/maximbaz)
|
||||||
* [Schievel1](https://github.com/Antynea/grub-btrfs/discussions/173#discussioncomment-1438790)
|
* [Schievel1](https://github.com/Antynea/grub-btrfs/discussions/173#discussioncomment-1438790)
|
||||||
|
|||||||
2
config
2
config
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
GRUB_BTRFS_VERSION=4.12-improve-version-generation-2022-11-26T14:03:10+00:00
|
GRUB_BTRFS_VERSION=4.12-make-prefix-configurable-2022-11-26T14:14:00+00:00
|
||||||
|
|
||||||
# Disable grub-btrfs.
|
# Disable grub-btrfs.
|
||||||
# Default: "false"
|
# Default: "false"
|
||||||
|
|||||||
Reference in New Issue
Block a user