On 05/11/2016 01:14 AM, Hannu Nyman wrote:
On 10/05/16 21:00, Ben Greear wrote:
If someone could add a way to put the git commit ID(s) into
the file system somewhere, I think that would be an excellent
addition.
And once the script is in place, a way to call it through the web UI would
be most welcome.
I use the following script to fetch the basic version info, compilation time,
commit info of the main source and three feeds, and to store that as a custom
file
into the built firmware:
That looks good to me...maybe send a patch to include it for upstream,
and logic to call it at build-time automatically?
Thanks,
Ben
#!/bin/bash
STATUSFILE=files/etc/Compile_info.txt
OwVers=`grep RELEASE: include/toplevel.mk | cut -d "=" -f 2`
echo LEDE $OwVers `scripts/getver.sh` / `date "+%F %H:%M"` > $STATUSFILE
echo "---" >> $STATUSFILE
echo "main "`(git show --format="%cd %h %s" --date=short | head -n 1 | cut
-b1-60)` >> $STATUSFILE
echo "luci "`(cd feeds/luci && git show --format="%cd %h %s" --date=short | head
-n 1 | cut -b1-60)` >> $STATUSFILE
echo "packages "`(cd feeds/packages && git show --format="%cd %h %s" --date=short |
head -n 1 | cut -b1-60)` >> $STATUSFILE
echo "routing "`(cd feeds/routing && git show --format="%cd %h %s" --date=short |
head -n 1 | cut -b1-60)` >> $STATUSFILE
That produces the following output for files/etc/Compile_info.txt
(/etc/Compile_info.txt in the live router):
LEDE Designated Driver r153 / 2016-05-11 11:06
---
main 2016-05-11 30d955a build: fix make clean, delete package dir
luci 2016-05-10 650c031 Merge pull request #717 from Umeaboy/patc
packages 2016-05-11 2339a82 libffi: bump to version 3.2.1
routing 2016-05-10 bec38bf Merge pull request #186 from stintel/bird
_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev
--
Ben Greear <gree...@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev