mcrapet / plowshare

Command-line tool and engine for managing sharing websites
GNU General Public License v3.0
847 stars 89 forks source link

2 version improvements #98

Closed bmwiedemann closed 7 years ago

bmwiedemann commented 7 years ago

in addition to #97 this includes guessing the version from release tarballs

tested to work on openSUSE with https://github.com/mcrapet/plowshare/archive/v%{version}.tar.gz

mcrapet commented 7 years ago

Hi,

Here is my new version: https://gist.github.com/mcrapet/fe8e8a32a3457bf3c597a00322120884

Could you review it?

bmwiedemann commented 7 years ago

Works for me (tested on openSUSE and Debian with dash), but you neglected the theoretical case of a non-GNU/Linux system with a 'date' that does not support -r. and the original version would have supported strange mixes like BSD date on Linux or GNU date on a BSD... no idea how common those are. I think, MacOS X has the most BSD users these days.

mcrapet commented 7 years ago

But as you said it is theoretically possible. What about checking date --version (first line) instead of uname -s?

bmwiedemann commented 7 years ago

actually, I only care about GNU/Linux, so you may just ignore such esoteric cases.

mcrapet commented 7 years ago

Last call: see v2 gist. For me this is good. No more uname dependency.

bmwiedemann commented 7 years ago

+1 👍

mcrapet commented 7 years ago

Committed db87b3d2bef6b2f3d52e50fa80eabee53eefab75. See for you help!