Giter Club home page Giter Club logo

Comments (5)

bvernoux avatar bvernoux commented on August 12, 2024

Nice fix, I will apply it and check all is ok

from airspyone_firmware.

bvernoux avatar bvernoux commented on August 12, 2024

Done thanks for your contribution

from airspyone_firmware.

 avatar commented on August 12, 2024

In case there is any problem with:
print '#define AIRSPY_FW_CHECKIN_DATE "' + git.show(['--pretty=format:%ai']).partition(' ')[0] + '"'
It can be replaced by:
print '#define AIRSPY_FW_CHECKIN_DATE "' + git.log('-1','--format=%ai').partition(' ')[0] + '"'
Which is probably easier to understand what it is doing

from airspyone_firmware.

bvernoux avatar bvernoux commented on August 12, 2024

I have tested it with success but any feedback is welcome and if some
configuration have problems we could use
print '#define AIRSPY_FW_CHECKIN_DATE "' + git.log(['-1
--format=%cd']).partition(' ')[0] + '"'
(if that solve problems)

On 6 September 2015 at 13:24, itsbert [email protected] wrote:

In case there is any problem with:
print '#define AIRSPY_FW_CHECKIN_DATE "' +
git.show(['--pretty=format:%ai']).partition(' ')[0] + '"'
It can be replaced by:
print '#define AIRSPY_FW_CHECKIN_DATE "' + git.log(['-1
--format=%cd']).partition(' ')[0] + '"'


Reply to this email directly or view it on GitHub
#13 (comment).

from airspyone_firmware.

 avatar commented on August 12, 2024

No, no problem here. it works for me. I just think that it is slightly less obtuse and more easily understood, but the name of the define, AIRSPY_FW_CHECKIN_DATE, helps to make things clear.

EDIT:
Actually there may be a problem, when I run "git show --pretty=format:%ai" in a local clone of another git that I have (liquid-dsp), I see the following:
$ git show --pretty=format:%ai
2015-07-21 18:49:53 -0400
But when I run it in airspy/firmware I see the following:
$ git show --pretty=format:%ai
2015-09-06 12:09:36 +0200
diff --git a/airspy_m0/airspy_m0.c b/airspy_m0/airspy_m0.c
index 805a829..9d8a7e6 100644
--- a/airspy_m0/airspy_m0.c
+++ b/airspy_m0/airspy_m0.c
@@ -74,7 +74,7 @@ volatile airspy_mcore_t set_packing = (airspy_mcore_t *)((&cm0_data_share)+2);
uint8_t
const usb_bulk_buffer = (uint8_t*)0x20004000;
uint8_t spiflash_buffer[W25Q80BV_PAGE_LEN];
-char version_string[] = VERSION_STRING " " AIRSPY_FW_GIT_TAG " "AIRSPY_FW_BUILD_DATE;
+char version_string[] = VERSION_STRING " " AIRSPY_FW_GIT_TAG " "AIRSPY_FW_CHECKIN_DATE;^M
uint8_t version_string_strlen = sizeof(version_string);
typedef struct {
diff --git a/scripts/airspy_fw-version.py b/scripts/airspy_fw-version.py
index 5442580..104592a 100755
--- a/scripts/airspy_fw-version.py
+++ b/scripts/airspy_fw-version.py
@@ -13,7 +13,7 @@ if len(args)==1:
sys.stdout = open(args[0], 'w')
git=Repo(search_parent_directories=True).git
print '#define AIRSPY_FW_GIT_TAG "' + git.describe(tags=True,always=True,dirty=True,long=True) + '"'
- print '#define AIRSPY_FW_BUILD_DATE "' + date.today().isoformat() + '"'
+ print '#define AIRSPY_FW_CHECKIN_DATE "' + git.show(['--pretty=format:%ai']).partition(' ')[0] + '"'
else:
parser.print_help()
sys.exit(1)

I haven't used git from python so it's behaviour may be different than the command that I'm using. :

I also edited the post that I made to use "%ai" instead of "%cd"

from airspyone_firmware.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.