-
Notifications
You must be signed in to change notification settings - Fork 1
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 #13 from brainelectronics/feature/render-version-f…
…ile-from-template Render version file from template
- Loading branch information
Showing
12 changed files
with
478 additions
and
93 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
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,45 @@ | ||
// | ||
// {{ file_name }} | ||
// | ||
// Rendered from {{ template_name }} by script on {{ creation_datetime }} | ||
// | ||
// Created by {{ machine_name }} | ||
// | ||
|
||
#include <stdio.h> | ||
|
||
#define MAJOR_VERSION {{ major_version }} | ||
#define MINOR_VERSION {{ minor_version }} | ||
#define PATCH_VERSION {{ patch_version }} | ||
|
||
void print_prerelease_data(void) | ||
{ | ||
printf("Prerelease data: {{ prerelease_data }}\n"); | ||
} | ||
|
||
void print_build_data(void) | ||
{ | ||
printf("Prerelease data: {{ build_data }}\n"); | ||
} | ||
|
||
void print_creation_datetime(void) | ||
{ | ||
printf("Creation datetime: {{ creation_datetime }}\n"); | ||
} | ||
|
||
void print_creator(void) | ||
{ | ||
printf("Created by {{ machine_name }}\n"); | ||
} | ||
|
||
int main(int argc, char const *argv[]) | ||
{ | ||
printf("Script version is (major.minor.patch): %d.%d.%d\n", MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION); | ||
|
||
print_prerelease_data(); | ||
print_build_data(); | ||
print_creation_datetime(); | ||
print_creator(); | ||
|
||
return 0; | ||
} |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# List external packages here | ||
# Avoid fixed versions | ||
# to parse changelog semver | ||
semver>=2.13.0,<3 | ||
semver>=2.13.0,<3 | ||
# to render template files | ||
jinja2>=3.1.0,<4 |
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
Oops, something went wrong.