Closed cpottle9 closed 1 year ago
Well this is going well for me :laughing:
bash version.sh *.uf2
pimoroni-cosmic_unicorn-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2: 3.4.0; MicroPython $MICROPYTHON_VERSION, cosmic_unicorn c1db2da33a884e57a4aa175c8479a8fca1c230ca on 2023-04-26
pimoroni-enviro-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2: 3.4.0; MicroPython $MICROPYTHON_VERSION, enviro c1db2da33a884e57a4aa175c8479a8fca1c230ca on 2023-04-26
pimoroni-galactic_unicorn-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2:
pimoroni-inky_frame-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2: 3.4.0; MicroPython $MICROPYTHON_VERSION, inky_frame c1db2da33a884e57a4aa175c8479a8fca1c230ca on 2023-04-26
pimoroni-pico-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2:
pimoroni-picolipo_16mb-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2:
pimoroni-picolipo_4mb-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2:
pimoroni-picow-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2: 3.4.0; MicroPython $MICROPYTHON_VERSION, picow c1db2da33a884e57a4aa175c8479a8fca1c230ca on 2023-04-26
pimoroni-tiny2040-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2:
pimoroni-tufty2040-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2:
Hmm:
strings pimoroni-tufty2040-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2 | grep MicroPython
3.4.0; MicroPython $MICROPYTHON_VERSION, tuf
MicroPython
Welcome to MicroPython!
Edit: Okay...
picotool info pimoroni-tufty2040-c1db2da33a884e57a4aa175c8479a8fca1c230ca-micropython.uf2 | grep version:
version: $MICROPYTHON_VERSION, tufty2040 c1db2da33a884e57a4aa175c8479a8fca1c230ca
I just need to fix that $MICROPYTHON_VERSION
This is now rolled out and seems to work.
When I run thonny with a Pimoroni micropython uf2 file I see:
I wrote a little bash script named mp_uf2_version.sh to extract version info directly from the uf2 file.
When I run this against the Pimoroni uf2 files in my Downloads directory I see:
The word dirty indicates an uncontrolled version. The git commit hash is from the micropython repo. Not from any repo owned by Pimoroni.
But, for the 'vanilla' uf2 files for pico w board I see:
The word dirty is missing and it contains the git tag and commit hash.
It would be good if your uf2 files contained the git tags and the git hash. That way users and your folks could easily tell which version is running.
I took a look at makeversionhdr.py. MICROPY_GIT_TAG and MICROPY_GIT_HASH can be overridden using environment variables. The important information is in MICROPY_GIT_TAG. In the current builds the value of MICROPY_GIT_HASH is not used. You can set environment variable MICROPY_GIT_TAG with version info from the badger2040 or pimoroni-pico repo as appropriate.