python-rpm-macros/update.sh
Jan Matejek 063020faf6 Accepting request 494239 from home:matejcik:rpm-macros-build-test
- version bump to 2017.05.09.fc237de
- fix badly generated %posttrans snippets in cases where
  old %python_install_alternative syntax is used for secondary files
- rework %if-macros
- introduce %python_flavor, which configures behavior of generic %python_*
  macros, and can be overriden by the user
- add --force to %python_install, to make install order fully deterministic

- version bump to 2017.04.27.d2ca08c
- switch versioning scheme to date-based
- switch from using service to a custom script update.sh
- auto-generate Provides: python2-modname in old distributions
  (only for main package though)

OBS-URL: https://build.opensuse.org/request/show/494239
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python-rpm-macros?expand=0&rev=39
2017-05-10 12:48:58 +00:00

24 lines
626 B
Bash

#!/bin/bash
GIT_URL=https://github.com/openSUSE/python-rpm-macros.git
SPEC_FILE_NAME=python-rpm-macros.spec
PREV_VERSION=$(sed -rn 's/^Version:\s+(.*)$/\1/p' $SPEC_FILE_NAME)
rm python-rpm-macros-$PREV_VERSION.tar.bz2
tmpdir=tmp.$RANDOM
git clone --depth=1 $GIT_URL $tmpdir
cd $tmpdir
cp packaging/* ..
VERSION=$(git log -n 1 --date=format:%Y.%m.%d --format=format:%cd.%h)
git archive --format=tar --prefix=python-rpm-macros-$VERSION/ HEAD \
| bzip2 -c > ../python-rpm-macros-$VERSION.tar.bz2
cd ..
rm -rf $tmpdir
sed -i -r 's/^(Version:\s+)(.*)$/\1'$VERSION'/' $SPEC_FILE_NAME
osc vc -m "version bump to $VERSION"