Skip to content

Commit

Permalink
firmware string based on firmewareVersion instead of git
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolkman committed Sep 21, 2022
1 parent a19833e commit 515cfaa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions create_release_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@


result = subprocess.run(
['git', 'describe', '--tags', '--abbrev=0'], stdout=subprocess.PIPE)
version = result.stdout.decode('utf-8')[:-1]
['cat','./firmwareVersion'], stdout=subprocess.PIPE)
version = result.stdout.decode('utf-8').strip()
print("Version " + str(version))
print("Current CLI targets", COMMAND_LINE_TARGETS)
print("Current Build targets", BUILD_TARGETS)

# print(env.Dump())
#print(env.Dump())


def post_program_action(source, target, env):
Expand Down
1 change: 1 addition & 0 deletions firmwareVersion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.1
3 changes: 2 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ lib_deps =
bblanchon/StreamUtils @ ^1.6.3
ayushsharma82/AsyncElegantOTA@^2.2.7
build_flags = !make
!echo '-D FIRMWAREVERSION=\\"'$(git describe --tags --abbrev=0)'\\"'
-DFIRMWAREVERSION='"v1.0.1"'
!echo '-D FIRMWAREVERSION=\\"'$(cat ./firmwareVersion)'\\"'
extra_scripts = post:create_release_script.py

[env:esp32dev-prod]
Expand Down

0 comments on commit 515cfaa

Please sign in to comment.