Browse Source

Merge pull request #20 from artemii235/etomic

Display appveyor build number as marketmaker version.
pass-iguana-arg
Artem Pikulin 7 years ago
committed by GitHub
parent
commit
36a4dade97
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .travis.yml
  2. 2
      appveyor.yml
  3. 7
      iguana/exchanges/CMakeLists.txt
  4. 8
      iguana/exchanges/LP_nativeDEX.c
  5. 1
      iguana/exchanges/mm.c
  6. 2
      marketmaker_build_etomic.cmd

3
.travis.yml

@ -20,8 +20,9 @@ before_install:
- git submodule update --init --recursive - git submodule update --init --recursive
script: script:
- export VERSION=`echo "$(git tag -l --points-at HEAD)"`
- mkdir build && cd build - mkdir build && cd build
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-7 ..; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake -DMM_VERSION="$VERSION" -DCMAKE_C_COMPILER=/usr/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-7 ..; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake ..; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake ..; fi
- cmake --build . --target marketmaker-mainnet - cmake --build . --target marketmaker-mainnet
- cmake --build . --target marketmaker-testnet - cmake --build . --target marketmaker-testnet

2
appveyor.yml

@ -15,7 +15,7 @@ artifacts:
name: marketmaker-mainnet name: marketmaker-mainnet
deploy: deploy:
release: marketmaker-v$(appveyor_build_version) release: v$(appveyor_build_version)
provider: GitHub provider: GitHub
auth_token: auth_token:
secure: iabzoz73JgtOIyE/Nmz4a4XefmK+7pIeup+1Hunj4hGKrdfesFN+176DMApgfu8t secure: iabzoz73JgtOIyE/Nmz4a4XefmK+7pIeup+1Hunj4hGKrdfesFN+176DMApgfu8t

7
iguana/exchanges/CMakeLists.txt

@ -31,4 +31,9 @@ target_link_libraries(marketmaker-mainnet ${MM_LIBS} etomiclib-mainnet)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
target_link_libraries(marketmaker-mainnet -static-libgcc -static-libstdc++) target_link_libraries(marketmaker-mainnet -static-libgcc -static-libstdc++)
target_link_libraries(marketmaker-testnet -static-libgcc -static-libstdc++) target_link_libraries(marketmaker-testnet -static-libgcc -static-libstdc++)
endif() endif()
if(NOT DEFINED MM_VERSION)
SET(MM_VERSION UNKNOWN)
endif()
target_compile_definitions(marketmaker-mainnet PRIVATE -DMM_VERSION="${MM_VERSION}")
target_compile_definitions(marketmaker-testnet PRIVATE -DMM_VERSION="${MM_VERSION}")

8
iguana/exchanges/LP_nativeDEX.c

@ -30,6 +30,9 @@
// there is an issue about waiting for notarization for a swap that never starts (expiration ok) // there is an issue about waiting for notarization for a swap that never starts (expiration ok)
#include <stdio.h> #include <stdio.h>
#ifndef MM_VERSION
#define MM_VERSION "UNKNOWN"
#endif
long LP_cjson_allocated,LP_cjson_total,LP_cjson_count; long LP_cjson_allocated,LP_cjson_total,LP_cjson_count;
@ -1290,8 +1293,7 @@ extern int32_t bitcoind_RPC_inittime;
void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybusport,char *passphrase,int32_t amclient,char *userhome,cJSON *argjson) void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybusport,char *passphrase,int32_t amclient,char *userhome,cJSON *argjson)
{ {
char *myipaddr=0,version[64]; long filesize,n; int32_t valid,timeout; struct LP_peerinfo *mypeer=0; char pushaddr[128],subaddr[128],bindaddr[128],*coins_str=0; cJSON *coinsjson=0; void *ctx = bitcoin_ctx(); char *myipaddr=0; long filesize,n; int32_t valid,timeout; struct LP_peerinfo *mypeer=0; char pushaddr[128],subaddr[128],bindaddr[128],*coins_str=0; cJSON *coinsjson=0; void *ctx = bitcoin_ctx();
sprintf(version,"Marketmaker %s.%s %s rsize.%ld",LP_MAJOR_VERSION,LP_MINOR_VERSION,LP_BUILD_NUMBER,sizeof(struct basilisk_request));
bitcoind_RPC_inittime = 1; bitcoind_RPC_inittime = 1;
if ( LP_MAXPRICEINFOS > 256 ) if ( LP_MAXPRICEINFOS > 256 )
{ {
@ -1299,7 +1301,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
exit(-1); exit(-1);
} }
LP_showwif = juint(argjson,"wif"); LP_showwif = juint(argjson,"wif");
printf("showwif.%d %s %u\n",LP_showwif,version,calc_crc32(0,version,(int32_t)strlen(version))); printf("showwif.%d version: %s %u\n",LP_showwif,MM_VERSION,calc_crc32(0,MM_VERSION,(int32_t)strlen(MM_VERSION)));
if ( passphrase == 0 || passphrase[0] == 0 ) if ( passphrase == 0 || passphrase[0] == 0 )
{ {
printf("jeezy says we cant use the nullstring as passphrase and I agree\n"); printf("jeezy says we cant use the nullstring as passphrase and I agree\n");

1
iguana/exchanges/mm.c

@ -164,6 +164,7 @@ int main(int argc, const char * argv[])
{ {
char dirname[512]; double incr; cJSON *retjson; char dirname[512]; double incr; cJSON *retjson;
OS_init(); OS_init();
printf("BarterDEX Marketmaker %s \n",MM_VERSION);
if ( strstr(argv[0],"btc2kmd") != 0 && argv[1] != 0 ) if ( strstr(argv[0],"btc2kmd") != 0 && argv[1] != 0 )
{ {
bits256 privkey,checkkey; uint8_t tmptype; char kmdwif[64],str[65],str2[65],*retstr; bits256 privkey,checkkey; uint8_t tmptype; char kmdwif[64],str[65],str2[65],*retstr;

2
marketmaker_build_etomic.cmd

@ -16,7 +16,7 @@ call scripts\install_deps.bat
cd .. cd ..
mkdir build_win64_release mkdir build_win64_release
cd build_win64_release cd build_win64_release
cmake .. -G "Visual Studio 14 2015 Win64" cmake .. -G "Visual Studio 14 2015 Win64" -DMM_VERSION="%APPVEYOR_BUILD_VERSION%"
rem Steps before build: rem Steps before build:
rem rem

Loading…
Cancel
Save