Skip to content

Commit

Permalink
ndctl: fix rpm source url, switch back to v$VERSION tag scheme
Browse files Browse the repository at this point in the history
The way to have github generate tarballs in ndctl-$VERSION format while
maintaining a v$VERSION tag scheme is to use a source url in the
following format:

https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
djbw committed May 28, 2016
1 parent aa20c52 commit 2768315
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions git-version
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

to_ver() {
VN=$1
#drop leading 'ndctl-' out of the version so its a pure number
if [ ${VN:0:6} = "ndctl-" ]; then
VN=${VN:6}
#drop leading 'v' out of the version so its a pure number
if [ ${VN:0:1} = "v" ]; then
VN=${VN:1}
fi
echo $VN
}
Expand All @@ -29,10 +29,10 @@ LF='
if test -f version; then
VN=$(cat version) || VN="$DEF_VER"
elif test -d ${GIT_DIR:-.git} -o -f .git &&
VN=$(git describe --match "ndctl-[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
ndctl-[0-9]*)
v[0-9]*)
VN="$(dirty $VN)"
esac; then
VN=$(echo "$VN" | sed -e 's/-/./g');
Expand Down
2 changes: 1 addition & 1 deletion ndctl.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
License: GPLv2
Group: System Environment/Base
Url: https://github.com/pmem/ndctl
Source0: https://github.com/pmem/ndctl/archive/ndctl-%{version}.tar.gz
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildRequires: autoconf
BuildRequires: asciidoc
Expand Down

0 comments on commit 2768315

Please sign in to comment.