summaryrefslogtreecommitdiff
path: root/manualPorts/dbmodel/lastVersion.sh
blob: e7c014def920aeb8c3f9a91cc618eb733e3470f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
cd '/usr/src/sonstiges/dbmodel'

git fetch --all >/dev/null 2>&1

commit=$(
  git rev-parse upstream/master
)

printf '%s.r%s.%s\n' \
  "$(
    git archive "${commit}" -- 'src/src.pro' | \
      sed -n '
        s/^VERSION = //
        T
        p
      '
  )" \
  "$(
    git rev-list --count "${commit}"
  )" \
  "${commit:0:12}"