all repos — tint2 @ 2357e3196525de547db6d540650cbb3a31414056

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Updated svn version scripts for git
o9000 o9000
commit

2357e3196525de547db6d540650cbb3a31414056

parent

3467a44761fb29354a18415250187364b4098477

4 files changed, 37 insertions(+), 44 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -113,7 +113,7 @@ set( DATADIR share CACHE PATH "Directory for shared data" )

set( SYSCONFDIR /etc CACHE PATH "Directory for configuration files" ) set( DOCDIR share/doc/tint2 CACHE PATH "Directory for documentation files" ) -add_custom_target( version ALL "${PROJECT_SOURCE_DIR}/get_svnrev.sh" "\"${PROJECT_SOURCE_DIR}\"" ) +add_custom_target( version ALL "${PROJECT_SOURCE_DIR}/get_version.sh" "\"${PROJECT_SOURCE_DIR}\"" ) link_directories( ${X11_LIBRARY_DIRS} ${PANGOCAIRO_LIBRARY_DIRS}
D get_svnrev.sh

@@ -1,27 +0,0 @@

-#!/bin/sh - -FALLBACK=\"0.11-svn\" - -if [ $# -eq 0 ]; then - DIR=. -else - DIR=$1 -fi - -if [ -f version.h ]; then - REV_OLD=$(cat version.h | cut -d" " -f3) -else - REV_OLD=\"\" -fi - -if [ -x "$(which svnversion 2>/dev/null)" -a -d "${DIR}/.svn" ] ; then - REV=\"$(svnversion -n ${DIR})\" -else - REV=${FALLBACK} -fi - -if [ ${REV_OLD} != ${REV} ]; then - echo "Building new version.h" - echo "Rev_old: ${REV_OLD} Rev: ${REV}" - echo "#define VERSION_STRING ${REV}" > version.h -fi
A get_version.sh

@@ -0,0 +1,3 @@

+#!/bin/sh + +git describe --exact-match 2>/dev/null || echo "0.11-git$(git show -s --pretty=format:%cI.%h | tr -d ':' | tr -d '-' | tr '.' '-' | sed 's/T[0-9\+]*//g')"
M make_release.shmake_release.sh

@@ -1,23 +1,40 @@

#!/bin/bash -# usage: ./make_release.sh RELEASE_VERSION_NUMBER +# Usage: ./make_release.sh +# Creates a tar.bz2 archive of the current tree. +# +# To bump the version number for the current commit (make sure you are in HEAD!), run manually: +# +# git tag -a v0.12 -m 'Version 0.12' +# +# To generate a release for an older tagged commit, first list the tags with: +# +# git tags +# +# then checkout the tagged commit with: +# +# git checkout tags/v0.1 +# +# Finally, to revert to HEAD: +# +# git checkout master + +VERSION=$(./get_version.sh) + +DIR=tint2-$VERSION +echo "Making release $DIR" +rm -rf $DIR -if [[ $# -ne 1 ]]; then - echo "usage: $0 RELEASE_VERSION_NUMBER" - exit -fi +git checkout-index --prefix=$DIR/ -a -DIR=tint2-${1} -echo "Making release ${DIR}" -rm -Rf ${DIR} -svn export . ${DIR} > /dev/null +# Delete unneeded files +rm -f $DIR/make_release.sh -# delete unneeded files -rm -f ${DIR}/configure ${DIR}/make_release.sh +echo "echo \"#define VERSION_STRING \\\"$VERSION\\\"\" > version.h" > $DIR/get_version.sh -# replace get_svnrev.sh by a simple echo command -echo "echo \"#define VERSION_STRING \\\"${1}\\\"\" > version.h" > ${DIR}/get_svnrev.sh +# Create tarball and remove the exported directory +tar -cjf $DIR.tar.bz2 $DIR +rm -rf $DIR -# create tarball and remove the exported directory -tar -cjf ${DIR}.tar.bz2 ${DIR} -rm -Rf ${DIR} +sha1sum -b $DIR.tar.bz2 +sha256sum -b $DIR.tar.bz2