File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ name: build
33on : [push, pull_request, workflow_dispatch]
44
55env :
6- IDE_VERSION : 1.8.13
7- TEENSY_VERSION : 153
6+ IDE_VERSION : 1.8.16
7+ TEENSY_VERSION : 155
88 IDE_LOCATION : /usr/local/share/arduino
99
1010jobs :
6262 sudo python ./.github/workflows/remove_teensyloader.py $IDE_LOCATION/hardware/teensy/avr/platform.txt
6363
6464 - name : Install Libraries for Examples
65- run : arduino --install-library "Nintendo Extension Ctrl:0.8.1 "
65+ run : arduino --install-library "Nintendo Extension Ctrl:0.8.3 "
6666
6767 - name : Build Examples
6868 run : |
Original file line number Diff line number Diff line change 11#!/usr/bin/python
22
33import sys
4+ import re
45
5- filepath = sys .argv [1 ]
6- lines = []
6+ filepath = sys .argv [1 ] # path of the file to parse
7+ lines = [] # list of lines from the file
8+ removed = False # flag for if the line was removed from the file
79
810with open (filepath , 'r' ) as f :
911 lines = f .readlines ()
1012
1113with open (filepath , 'w' ) as f :
14+ # matching "postbuild" hooks of any number which call the "teensy_post_compile" application
15+ pattern = re .compile ("recipe\.hooks\.postbuild\.[0-9]\.pattern=\" {compiler\.path}teensy_post_compile\" " )
1216 for line in lines :
13- if not line . startswith ( "recipe.hooks.postbuild.3. pattern= \" {compiler.path}teensy_post_compile \" " ): # remove post-compile trigger
17+ if not pattern . match ( line ):
1418 f .write (line )
1519 else :
1620 print ("Removing line '{}'" .format (line .strip ('\n ' )))
21+ removed = True
22+
23+ if not removed :
24+ raise RuntimeError ("Did not find a matching line to remove in \" {}\" " .format (filepath ))
You can’t perform that action at this time.
0 commit comments