File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 2525 },
2626 "license" : " MIT" ,
2727 "frameworks" : " *" ,
28- "platforms" : " *"
28+ "platforms" : " *" ,
29+ "scripts" : {
30+ "postinstall" : " piogenversion.py"
31+ }
2932}
Original file line number Diff line number Diff line change 1+ ver = ""
2+ with open ("VERSION" , 'r' ) as file :
3+ ver = file .read ()
4+
5+ lines = [
6+ "#ifdef __cplusplus\n " ,
7+ "extern \" C\" {\n " ,
8+ "#endif\n " ,
9+ "extern const char* const RCPT_VERSION;\n " ,
10+ "extern const char* const RCPT_VERSION_END;\n " ,
11+ "const char* const RCPT_VERSION = \" " + ver + "\" ;\n " ,
12+ "const char* const RCPT_VERSION_END = RCPT_VERSION + " + str (len (ver )) + ";\n " ,
13+ "#ifdef __cplusplus\n " ,
14+ "}\n " ,
15+ "#endif\n "
16+ ]
17+
18+ with open ("src/VERSION.cpp" , 'w' ) as file :
19+ file .writelines (lines )
20+
You can’t perform that action at this time.
0 commit comments