token-vesting
token-vesting copied to clipboard
automate version expansion
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}
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
- 11408f2 https://github.com/SpenceKonde/megaTinyCore/pull/772/commits/11408f2f04ce11b22b1bf1e01c997fbccbcc1162 automate version expansion
File Changes
(3 files https://github.com/SpenceKonde/megaTinyCore/pull/772/files)
- A megaavr/extras/development/expand_platform_txt.py https://github.com/SpenceKonde/megaTinyCore/pull/772/files#diff-8f3d7bbe1499b7b927f236017db275350c1592b9fbc3bae6d578f2d2f0a00402 (32)
- M megaavr/platform.txt https://github.com/SpenceKonde/megaTinyCore/pull/772/files#diff-310540bc162899df06ee4a59f203f8d3e2d6e867646a2758622f4aae62b807ff (2)
- A megaavr/platform.txt.in https://github.com/SpenceKonde/megaTinyCore/pull/772/files#diff-e8243dd34a0f41bb37066ac0b0cec541d67d832a2dd99ca2859fc8e542cb3ac8 (477)
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: @.***
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
- 11408f2 https://github.com/SpenceKonde/megaTinyCore/pull/772/commits/11408f2f04ce11b22b1bf1e01c997fbccbcc1162 automate version expansion
File Changes
(3 files https://github.com/SpenceKonde/megaTinyCore/pull/772/files)
- A megaavr/extras/development/expand_platform_txt.py https://github.com/SpenceKonde/megaTinyCore/pull/772/files#diff-8f3d7bbe1499b7b927f236017db275350c1592b9fbc3bae6d578f2d2f0a00402 (32)
- M megaavr/platform.txt https://github.com/SpenceKonde/megaTinyCore/pull/772/files#diff-310540bc162899df06ee4a59f203f8d3e2d6e867646a2758622f4aae62b807ff (2)
- A megaavr/platform.txt.in https://github.com/SpenceKonde/megaTinyCore/pull/772/files#diff-e8243dd34a0f41bb37066ac0b0cec541d67d832a2dd99ca2859fc8e542cb3ac8 (477)
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: @.***
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.
This is now being worked around manually,