Enable dynamic build dates, plus print SDK version.
This commit is contained in:
parent
439f72c43a
commit
21c4e11020
|
@ -3,15 +3,16 @@ before_install:
|
||||||
- sudo apt-get install -y python-serial srecord
|
- sudo apt-get install -y python-serial srecord
|
||||||
install:
|
install:
|
||||||
- tar -zxvf tools/esp-open-sdk.tar.gz
|
- tar -zxvf tools/esp-open-sdk.tar.gz
|
||||||
- export PATH=$PATH:$PWD/esp-open-sdk/sdk:$PWD/esp-open-sdk/xtensa-lx106-elf/bin
|
- export PATH=$PATH:$PWD/esp-open-sdk/xtensa-lx106-elf/bin
|
||||||
script:
|
script:
|
||||||
- make all
|
- export BUILD_DATE=$(date +%Y%m%d)
|
||||||
|
- make EXTRA_CCFLAGS="-DBUILD_DATE='\"'$BUILD_DATE'\"'" all
|
||||||
- cd bin/
|
- cd bin/
|
||||||
- file_name_float="nodemcu_float_${TRAVIS_TAG}.bin"
|
- file_name_float="nodemcu_float_${TRAVIS_TAG}.bin"
|
||||||
- srec_cat -output ${file_name_float} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
|
- srec_cat -output ${file_name_float} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
|
||||||
- cd ../
|
- cd ../
|
||||||
- make clean
|
- make clean
|
||||||
- make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL"
|
- make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL -DBUILD_DATE='\"'$BUILD_DATE'\"'"
|
||||||
- cd bin/
|
- cd bin/
|
||||||
- file_name_integer="nodemcu_integer_${TRAVIS_TAG}.bin"
|
- file_name_integer="nodemcu_integer_${TRAVIS_TAG}.bin"
|
||||||
- srec_cat -output ${file_name_integer} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
|
- srec_cat -output ${file_name_integer} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
#define NODE_VERSION_INTERNAL 0U
|
#define NODE_VERSION_INTERNAL 0U
|
||||||
|
|
||||||
#define NODE_VERSION "NodeMCU 1.4.0"
|
#define NODE_VERSION "NodeMCU 1.4.0"
|
||||||
#define BUILD_DATE "build 20151006"
|
#ifndef BUILD_DATE
|
||||||
|
#define BUILD_DATE "20151006"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern char SDK_VERSION[];
|
||||||
|
|
||||||
#endif /* __USER_VERSION_H__ */
|
#endif /* __USER_VERSION_H__ */
|
||||||
|
|
|
@ -135,9 +135,13 @@ static int docall (lua_State *L, int narg, int clear) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void print_version (void) {
|
static void print_version (lua_State *L) {
|
||||||
// l_message(NULL, LUA_RELEASE " " LUA_COPYRIGHT);
|
lua_pushliteral (L, "\n" NODE_VERSION " build " BUILD_DATE " powered by " LUA_RELEASE " on SDK ");
|
||||||
l_message(NULL, "\n" NODE_VERSION " " BUILD_DATE " powered by " LUA_RELEASE);
|
lua_pushstring (L, SDK_VERSION);
|
||||||
|
lua_concat (L, 2);
|
||||||
|
const char *msg = lua_tostring (L, -1);
|
||||||
|
l_message (NULL, msg);
|
||||||
|
lua_pop (L, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -399,7 +403,7 @@ static int pmain (lua_State *L) {
|
||||||
lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */
|
lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */
|
||||||
luaL_openlibs(L); /* open libraries */
|
luaL_openlibs(L); /* open libraries */
|
||||||
lua_gc(L, LUA_GCRESTART, 0);
|
lua_gc(L, LUA_GCRESTART, 0);
|
||||||
print_version();
|
print_version(L);
|
||||||
s->status = handle_luainit(L);
|
s->status = handle_luainit(L);
|
||||||
#if 0
|
#if 0
|
||||||
if (s->status != 0) return 0;
|
if (s->status != 0) return 0;
|
||||||
|
|
Loading…
Reference in New Issue