-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use one .env file to plugin name, version, etc.
- Loading branch information
1 parent
f390080
commit bf0d8b1
Showing
9 changed files
with
84 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
COMPANY_NAME="Black Box Audio" | ||
PLUGIN_NAME="Plugin" | ||
PLUGIN_VERSION="X.Y.Z" | ||
PLUGIN_BUNDLE_ID="com.bbx-audio.plugin-name" |
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
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,21 @@ | ||
# Function to load and parse a .env file | ||
function(load_env_file env_file) | ||
if (EXISTS "${env_file}") | ||
file(READ "${env_file}" ENV_CONTENT) | ||
string(REGEX REPLACE "\n" ";" ENV_LINES "${ENV_CONTENT}") | ||
foreach (line ${ENV_LINES}) | ||
string(STRIP "${line}" line) | ||
string(REGEX MATCH "^[A-Za-z_][A-Za-z0-9_]*=.*" is_valid "${line}") | ||
if (is_valid) | ||
string(REPLACE "=" ";" kv_pair "${line}") | ||
list(GET kv_pair 0 key) | ||
list(GET kv_pair 1 value) | ||
string(STRIP "${key}" key) | ||
string(STRIP "${value}" value) | ||
set("${key}" "${value}" PARENT_SCOPE) | ||
endif () | ||
endforeach () | ||
else () | ||
message(FATAL_ERROR "The .env file '${env_file}' does not exist.") | ||
endif () | ||
endfunction() |
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