Message ID | 20160828212713.27247-1-tarek@ring0.de |
---|---|
State | Changes Requested |
Headers | show |
diff --git a/buildscript b/buildscript index 53985c4..5a23037 100755 --- a/buildscript +++ b/buildscript @@ -192,6 +192,9 @@ prebuild() { #insert actual firware version informations into release file version=$(git describe --tags --dirty) + if [ $? -ne 0 ]; then + version=$(git log | grep -m 1 commit | tail -c41 | head -c7) + fi community=$(basename "$(realpath selected_community)" .cfg) {
FYI On 08/28/16 23:27, Jan-Tarek Butt wrote: > --- > buildscript | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/buildscript b/buildscript > index 53985c4..5a23037 100755 > --- a/buildscript > +++ b/buildscript > @@ -192,6 +192,9 @@ prebuild() { > > #insert actual firware version informations into release file > version=$(git describe --tags --dirty) > + if [ $? -ne 0 ]; then > + version=$(git log | grep -m 1 commit | tail -c41 | head -c7) > + fi > community=$(basename "$(realpath selected_community)" .cfg) > > { > -- > 2.9.3 >
Moin Am Sonntag, den 28.08.2016, 23:27 +0200 schrieb Jan-Tarek Butt: > --- > buildscript | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/buildscript b/buildscript > index 53985c4..5a23037 100755 > --- a/buildscript > +++ b/buildscript > @@ -192,6 +192,9 @@ prebuild() { > > #insert actual firware version informations into release file > version=$(git describe --tags --dirty) > + if [ $? -ne 0 ]; then > + version=$(git log | grep -m 1 commit | tail -c41 | head -c7) Generell halte ich das Feature für bestrebenswert. Diese Lösung ist mir aber zu sehr von der Formatierung abhängig. Wer weiß, ob sich das nicht doch mal ändert? Wie wäre es daher git direkt anzuweisen nur das auszugeben was wir hier haben wollen? --- %< --- git log -1 --pretty=format:%h --- >% --- Tim > + fi > community=$(basename "$(realpath selected_community)" .cfg) > > { > -- > 2.9.3 >
Moin Moin, > Am Sonntag, den 28.08.2016, 23:27 +0200 schrieb Jan-Tarek Butt: >> --- >> buildscript | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/buildscript b/buildscript >> index 53985c4..5a23037 100755 >> --- a/buildscript >> +++ b/buildscript >> @@ -192,6 +192,9 @@ prebuild() { >> >> #insert actual firware version informations into release file >> version=$(git describe --tags --dirty) >> + if [ $? -ne 0 ]; then >> + version=$(git log | grep -m 1 commit | tail -c41 | head -c7) > Generell halte ich das Feature für bestrebenswert. Diese Lösung ist mir > aber zu sehr von der Formatierung abhängig. Wer weiß, ob sich das nicht > doch mal ändert? > > Wie wäre es daher git direkt anzuweisen nur das auszugeben was wir hier > haben wollen? jop, ich sende nen neuen. Damit spart man sich auch die ganzen externen Programm aufrufe. > --- %< --- > git log -1 --pretty=format:%h > --- >% --- vg Tarek