Skip to content

Commit 1b1f6c3

Browse files
committed
Fix version mismatch between Makefile and meson
1 parent d0f8976 commit 1b1f6c3

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
include config.mk
55

6-
VERSION := "1.13.0-non-git"
7-
ifneq ($(wildcard ./.git/),)
8-
VERSION := "$(shell ${GIT} describe --tags 2>/dev/null || echo ${VERSION})"
9-
endif
6+
VERSION := "$(shell ./get-version.sh)"
107

118
SYSTEMD ?= $(shell $(PKG_CONFIG) --silence-errors ${SYSTEMDAEMON} || echo 0)
129

docs/internal/release-checklist.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- [ ] Update the changelog
33
- [ ] Write release notes (Only if non-patch release)
44
- [ ] Verify that the working directory is clean and on the master branch
5-
- [ ] Change the version in the Makefile to "x.x.x (iso-date)" (ex. "1.9.0 (2022-06-27)")
5+
- [ ] Change the version in the get-version.sh to "x.x.x (iso-date)" (ex. "1.9.0 (2022-06-27)")
66
- [ ] Commit changes (Commit title: `Dunst vX.X.X`)
77
- [ ] Tag commit, make sure it's an annotated tag (`git tag -a "vX.X.X" -m "Dunst vX.X.X"`)
88
- [ ] Push commits and tags
@@ -17,5 +17,5 @@
1717
- [ ] Copy release notes to githubs release feature
1818
- [ ] Publish release on github
1919

20-
- [ ] Update Makefile version to "x.x.x-non-git"
20+
- [ ] Update the get-version.sh fallback to "x.x.x-non-git"
2121
- [ ] Commit & push

get-version.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
# Fallback version here
4+
version="1.13.0-non-git"
5+
6+
version="$(git describe --tags 2>/dev/null || echo "$version")"
7+
8+
# No leading newline
9+
printf "%s" "$version"

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(
22
'dunst',
33
'c',
4-
version: '1.9.2',
4+
version: run_command('./get-version.sh', check: true).stdout(),
55
license: 'MIT',
66
meson_version: '>=0.60.0',
77
default_options: [

0 commit comments

Comments
 (0)