File: get-orig-source

package info (click to toggle)
python-mapnik 1%3A0.0~20200224-7da019cf9-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,784 kB
  • sloc: python: 12,085; cpp: 5,717; sh: 101; makefile: 18
file content (19 lines) | stat: -rwxr-xr-x 553 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

REMOTE=upstream
BRANCH=${REMOTE}/v3.0.x

if [ $(git remote show ${REMOTE} | wc -l) -eq 0 ]; then
	git remote add ${REMOTE} https://github.com/mapnik/python-mapnik.git
fi

git fetch ${REMOTE} --no-tags

PACKAGE=$(dpkg-parsechangelog | grep ^Source: | awk '{print $2}')

COMMIT=$(git log -n1 --format=format:%h ${BRANCH})
DATE=$(date +%Y%m%d --date="@$(git log -n1 --format=format:%ct ${BRANCH})")

VERSION="0.0~${DATE}-${COMMIT}"

git archive --format=tar.gz --prefix=${PACKAGE}-${VERSION}/ -o ../${PACKAGE}_${VERSION}.orig.tar.gz ${BRANCH}