-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from redmushie/master
Embed API URL and firmware version from CI
- Loading branch information
Showing
6 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
|
||
Import("env") | ||
|
||
# This file is invoked by PlatformIO during build. | ||
# See "extra_scripts" in "platformio.ini". | ||
|
||
# Fetch environment variables, with sane defaults if not found. | ||
# These variables should be defined by the CI. | ||
shocklinkApiUrl = os.getenv('SHOCKLINK_API_URL') or "api.shocklink.net" | ||
shocklinkFwVersion = os.getenv('SHOCKLINK_FW_VERSION') or "0.8.1" | ||
|
||
# Define these variables as macros for expansion during build time. | ||
env.Append(CPPDEFINES=[ | ||
("SHOCKLINK_API_URL", env.StringifyMacro(shocklinkApiUrl)), | ||
("SHOCKLINK_FW_VERSION", env.StringifyMacro(shocklinkFwVersion)) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.