From 3834ba0056e35df4d957387fe2bebbdcca4b3dea Mon Sep 17 00:00:00 2001 From: Robert L Toscano Date: Thu, 24 Mar 2011 01:46:20 -0700 Subject: [PATCH] Switches to bash script for packaging. --- Makefile | 8 -------- giterdone.gedit-plugin | 2 +- giterdone/vcs/git.py | 12 +++++------- package.sh | 27 +++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 16 deletions(-) delete mode 100644 Makefile create mode 100755 package.sh diff --git a/Makefile b/Makefile deleted file mode 100644 index 003d9f8..0000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -giterdone.zip: giterdone/resources/*.svg \ - giterdone/vcs/*.py \ - giterdone/*.py \ - giterdone.gedit-plugin \ - COPYING \ - INSTALL \ - README - zip giterdone.zip $^ diff --git a/giterdone.gedit-plugin b/giterdone.gedit-plugin index 26c8264..4caab6e 100644 --- a/giterdone.gedit-plugin +++ b/giterdone.gedit-plugin @@ -3,7 +3,7 @@ Loader=python Module=giterdone IAge=2 Name=Giterdone VCS Integration -Description=A Vcs overlay on the File Browser Plugin and Repository Manager. Version 1.2.1. +Description=A Vcs overlay on the File Browser Plugin and Repository Manager. Version ${version} Icon=gnome-session-switch Authors=Robert Lopez Toscano Copyright=Copyright © 2011 Robert Lopez Toscano diff --git a/giterdone/vcs/git.py b/giterdone/vcs/git.py index 026e293..16fea43 100644 --- a/giterdone/vcs/git.py +++ b/giterdone/vcs/git.py @@ -63,14 +63,12 @@ class GitInterface(GenericVcsInterface): for line in stdout.split('\n'): if not line: continue path = os.path.join(root_path, line[3:]) - if line.startswith('M ') or line.startswith('A '): - self._add_ancestors(root_path, path, filemap, state.STAGED) - elif line.startswith(' M') or line.startswith('MM'): - self._add_ancestors(root_path, path, filemap, state.DIRTY) - elif line.startswith('??'): + if line[:2] == '??': self._add_ancestors(root_path, path, filemap, state.UNTRACKED) - elif line.startswith(' D') or line.startswith('D '): - continue + elif line[1] != ' ': + self._add_ancestors(root_path, path, filemap, state.DIRTY) + elif line[1] == ' ': + self._add_ancestors(root_path, path, filemap, state.STAGED) else: GitInterface._logger.warning( 'Unexpected line in "git status --porcelain": "%s"', line) diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..9099177 --- /dev/null +++ b/package.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +VERSION=`git tag | tail -n 1 | tr -d 'v'` +echo "Packaging giterdone version $VERSION" +mkdir package +mkdir package/giterdone +mkdir package/giterdone/resources +mkdir package/giterdone/vcs +cp giterdone/resources/*.svg package/giterdone/resources/ +cp giterdone/vcs/*.py package/giterdone/vcs/ +cp giterdone/*.py package/giterdone/ +cp COPYING package/COPYING +cp INSTALL package/INSTALL +cp README package/README +sed "s/\${version}/$VERSION/g" giterdone.gedit-plugin > package/giterdone.gedit-plugin +cd package +zip giterdone giterdone/resources/*.svg \ + giterdone/vcs/*.py \ + giterdone/*.py \ + giterdone.gedit-plugin \ + COPYING \ + INSTALL \ + README +cd ../ +mv package/giterdone.zip giterdone-$VERSION.zip +rm -r package +echo "Done" -- 2.11.4.GIT