forked from openSUSE/obs-service-source_validator
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add some helper files to create tar and changes
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
PRJ=openSUSE:Tools | ||
PKG=osc-source_validator | ||
|
||
all: | ||
|
||
package: | ||
@if test -d $(PKG); then cd $(PKG) && osc up && cd -; else osc co -c $(PRJ) $(PKG); fi | ||
@./mkchanges | tee $(PKG)/.changes | ||
@test ! -s $(PKG)/.changes || git push | ||
@test -z "`git rev-list remotes/origin/master..master`" || { echo "unpushed changes"; exit 1; } | ||
@f=(*bz2); test -z "$f" || /bin/rm -vi *.bz2 | ||
@./mktar | ||
@mv *bz2 $(PKG) | ||
|
||
.PHONY: all package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
# create log suitable for c&p into rpm changes file | ||
if [ -z "$1" ]; then | ||
set -- remotes/origin/master..master | ||
fi | ||
# no idea why it always prints those commit lines | ||
git rev-list --pretty=format:" - %s" "$@" |grep -v ^commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
set -e | ||
NAME=osc-source_validator | ||
VERSION=0.1 | ||
datefmt="%Y.%m.%d.%H%M" | ||
LAST_COMMIT=(`git rev-list --timestamp HEAD^..HEAD`) | ||
DATE=`date +$datefmt -d "1970-01-01 00:00 UTC $LAST_COMMIT seconds"` | ||
#scmver="$DATE" | ||
fullver="$VERSION${scmver:+_}$scmver" | ||
pfx="$NAME${fullver:+-$fullver}" | ||
fn="$pfx".tar.bz2 | ||
git archive --prefix="$pfx"/ HEAD | bzip2 > $fn | ||
echo "version $fullver -> $fn" |