mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-29 11:13:52 +00:00
Fedora COPR support
- Support .copr/Makefile for 'SCM / make srpm' COPR package - Use genrpm.sh to generate srpm and optionally build it - Use generic substitution syntax in specfile
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# determine version and release number
|
||||
GIT_DESCRIBE=$(git describe --tags --match 'v*' --long)
|
||||
# GIT_DESCRIBE is like v3.0.3-11-g1e3f35c-dirty
|
||||
if [[ ! "$GIT_DESCRIBE" =~ ^v([^-]+)-([0-9]+)-g([0-9a-f]+)$ ]]; then
|
||||
>&2 echo 'ERROR - unrecognized `git describe` output: '"$GIT_DESCRIBE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version=${BASH_REMATCH[1]}
|
||||
commits=${BASH_REMATCH[2]}
|
||||
short_hash=${BASH_REMATCH[3]}
|
||||
|
||||
release=1
|
||||
if [ "${commits}" -gt 0 ] ; then
|
||||
release+=.${commits}.git${short_hash}
|
||||
fi
|
||||
|
||||
echo "${version} ${release}"
|
||||
Reference in New Issue
Block a user