release_commit.sh 902 Bytes
Newer Older
1 2 3 4 5 6
#!/bin/sh

# load common functions, compatible with local and installed script
. /usr/share/eterbuild/eterbuild
load_mod spec etersoft

7 8 9 10 11
push_tag()
{
    local version="$1"
    git tag -a "$version" -e -s -m "$(rpmlog -q --last-changelog | sed -e 's|^* ||')"
    git push pub.github $version
12
    git push pub.gitlab $version
13 14 15 16 17 18 19 20
}

if [ -n "$1" ] ; then
    [ "$(git tag -l "$1")" = "$1" ] || fatal "Can't find tag '$1' in the repo."
    push_tag $1
    exit
fi

21 22
SPECNAME=eepm.spec
version="$(get_version $SPECNAME)"
23
baseversion=$(echo "$version" | sed -e 's|\.[0-9]*$||')
24
minorversion=$(echo "$baseversion" | sed -e 's|.*\.||')
25

26
[ "$((minorversion%2))" = 1 ] && version="$version-beta"
27

28
./pack_in_onefile.sh || exit
29

30 31
git add packed
git commit packed -m "commit packed $version"
32 33

push_tag $version
34
gpush pub.github
Vitaly Lipatov's avatar
Vitaly Lipatov committed
35

36

Vitaly Lipatov's avatar
Vitaly Lipatov committed
37
rpmpub /var/ftp/pub/Korinf/sources
38
#rpmpub /var/ftp/pub/Etersoft/EPM/$baseversion/sources