token-vesting icon indicating copy to clipboard operation
token-vesting copied to clipboard

automate version expansion

Open ObviousInRetrospect opened this issue 2 years ago • 3 comments

script to generate platform.txt from platform.txt.in platform.txt renamed to platform.txt.in output of script checked in so change doesn't break automated tests left it general so any variable versionnum.* will get expanded to whatever was after the =

to run: python3 extras/development/expand_platform_txt.py > platform.txt

result:

--- platform.txt.in	2022-08-18 15:45:49.000000000 -0700
+++ platform.txt	2022-08-18 16:07:54.000000000 -0700
@@ -11,7 +11,7 @@
 versionnum.postfix=
 versionnum.released=0

-version={versionnum.major}.{versionnum.minor}.{versionnum.patch}{versionnum.postfix}
+version=2.6.0

 build.versiondefines=-DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DMEGATINYCORE="{version}" -DMEGATINYCORE_MAJOR={versionnum.major}UL -DMEGATINYCORE_MINOR={versionnum.minor}UL -DMEGATINYCORE_PATCH={versionnum.patch}UL -DMEGATINYCORE_RELEASED={versionnum.released}

ObviousInRetrospect avatar Aug 18 '22 23:08 ObviousInRetrospect

thanks! I'll look into how to integrate it with my current releasescripts (see the repo of that name) (see we already have one todo the SHA256 hash (yes they put a fucking crypto grade hash funchtion in to validate file integrety) and build the final archive for the board manager installations which have to have a different directory structure.

On Thu, Aug 18, 2022 at 7:13 PM ObviousInRetrospect < @.***> wrote:

script to generate platform.txt from platform.txt.in platform.txt renamed to platform.txt.in output of script checked in so change doesn't break automated tests left it general so any variable versionnum.* will get expanded to whatever was after the =

to run: python3 extras/development/expand_platform_txt.py > platform.txt

result:

--- platform.txt.in 2022-08-18 15:45:49.000000000 -0700+++ platform.txt 2022-08-18 16:07:54.000000000 -0700@@ -11,7 +11,7 @@ versionnum.postfix= versionnum.released=0 -version={versionnum.major}.{versionnum.minor}.{versionnum.patch}{versionnum.postfix}+version=2.6.0

build.versiondefines=-DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DMEGATINYCORE="{version}" -DMEGATINYCORE_MAJOR={versionnum.major}UL -DMEGATINYCORE_MINOR={versionnum.minor}UL -DMEGATINYCORE_PATCH={versionnum.patch}UL -DMEGATINYCORE_RELEASED={versionnum.released}


You can view, comment on, or merge this pull request online at:

https://github.com/SpenceKonde/megaTinyCore/pull/772 Commit Summary

File Changes

(3 files https://github.com/SpenceKonde/megaTinyCore/pull/772/files)

Patch Links:

  • https://github.com/SpenceKonde/megaTinyCore/pull/772.patch
  • https://github.com/SpenceKonde/megaTinyCore/pull/772.diff

— Reply to this email directly, view it on GitHub https://github.com/SpenceKonde/megaTinyCore/pull/772, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTXEW4ZZTJK3PP6VEEXXG3VZ27RRANCNFSM56622CEA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--


Spence Konde Azzy’S Electronics

New products! Check them out at tindie.com/stores/DrAzzy GitHub: github.com/SpenceKonde ATTinyCore https://github.com/SpenceKonde/ATTinyCore: Arduino support for all pre-2016 tinyAVR with >2k flash! megaTinyCore https://github.com/SpenceKonde/megaTinyCore: Arduino support for all post-2016 tinyAVR parts! DxCore https://github.com/SpenceKonde/DxCore: Arduino support for the AVR Dx-series parts, the latest and greatest from Microchip! Contact: @.***

SpenceKonde avatar Aug 19 '22 02:08 SpenceKonde

because I think this step reality belongs at the point where the difference in behavior is determined and that is the moment when it is decided whether to do a manual install or board manager install (you know they aren't quite the same right and need the hash calculations, which means a linux script, which I then regex the output of into the entry for boards.txt. The default will be for manual install because we need to be able to work on it, and the script needs to be applied to boards.txt as part of build___Core.sh before archiving and hashing.

On Thu, Aug 18, 2022 at 7:13 PM ObviousInRetrospect < @.***> wrote:

script to generate platform.txt from platform.txt.in platform.txt renamed to platform.txt.in output of script checked in so change doesn't break automated tests left it general so any variable versionnum.* will get expanded to whatever was after the =

to run: python3 extras/development/expand_platform_txt.py > platform.txt

result:

--- platform.txt.in 2022-08-18 15:45:49.000000000 -0700+++ platform.txt 2022-08-18 16:07:54.000000000 -0700@@ -11,7 +11,7 @@ versionnum.postfix= versionnum.released=0 -version={versionnum.major}.{versionnum.minor}.{versionnum.patch}{versionnum.postfix}+version=2.6.0

build.versiondefines=-DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DMEGATINYCORE="{version}" -DMEGATINYCORE_MAJOR={versionnum.major}UL -DMEGATINYCORE_MINOR={versionnum.minor}UL -DMEGATINYCORE_PATCH={versionnum.patch}UL -DMEGATINYCORE_RELEASED={versionnum.released}


You can view, comment on, or merge this pull request online at:

https://github.com/SpenceKonde/megaTinyCore/pull/772 Commit Summary

File Changes

(3 files https://github.com/SpenceKonde/megaTinyCore/pull/772/files)

Patch Links:

  • https://github.com/SpenceKonde/megaTinyCore/pull/772.patch
  • https://github.com/SpenceKonde/megaTinyCore/pull/772.diff

— Reply to this email directly, view it on GitHub https://github.com/SpenceKonde/megaTinyCore/pull/772, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTXEW4ZZTJK3PP6VEEXXG3VZ27RRANCNFSM56622CEA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--


Spence Konde Azzy’S Electronics

New products! Check them out at tindie.com/stores/DrAzzy GitHub: github.com/SpenceKonde ATTinyCore https://github.com/SpenceKonde/ATTinyCore: Arduino support for all pre-2016 tinyAVR with >2k flash! megaTinyCore https://github.com/SpenceKonde/megaTinyCore: Arduino support for all post-2016 tinyAVR parts! DxCore https://github.com/SpenceKonde/DxCore: Arduino support for the AVR Dx-series parts, the latest and greatest from Microchip! Contact: @.***

SpenceKonde avatar Aug 19 '22 03:08 SpenceKonde

python has hashlib which can give you sha256 portably if that makes anything easier

don't care where this runs/lives I just saw you complaining about python regexes and knew it would take me all of 5 minutes. I had figured putting it next to the boards generator was reasonable.

ObviousInRetrospect avatar Aug 19 '22 05:08 ObviousInRetrospect

This is now being worked around manually,

SpenceKonde avatar Jan 12 '23 02:01 SpenceKonde