mirror of
https://github.com/Netflix/dial-reference.git
synced 2026-06-08 02:49:58 +00:00
dial spec 1.7
This commit is contained in:
38
build/Version.h
Normal file
38
build/Version.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* (c) 1997-2015 Netflix, Inc. All content herein is protected by
|
||||
* U.S. copyright and other applicable intellectual property laws and
|
||||
* may not be copied without the express permission of Netflix, Inc.,
|
||||
* which reserves all rights. Reuse of any of this content for any
|
||||
* purpose without the permission of Netflix, Inc. is strictly
|
||||
* prohibited.
|
||||
*/
|
||||
|
||||
#ifndef DIAL_VERSION_H
|
||||
#define DIAL_VERSION_H
|
||||
|
||||
#undef DIAL_VERSION_MAJOR
|
||||
#define DIAL_VERSION_MAJOR 1
|
||||
|
||||
#undef DIAL_VERSION_MINOR
|
||||
#define DIAL_VERSION_MINOR 0
|
||||
|
||||
#undef DIAL_VERSION_PATCH
|
||||
#define DIAL_VERSION_PATCH 5
|
||||
|
||||
#undef DIAL_VERSION_NUMBER_STR2
|
||||
#define DIAL_VERSION_NUMBER_STR2(M) #M
|
||||
#undef DIAL_VERSION_NUMBER_STR
|
||||
#define DIAL_VERSION_NUMBER_STR(M) DIAL_VERSION_NUMBER_STR2(M)
|
||||
|
||||
#undef DIAL_VERSION_NUMBER
|
||||
#define DIAL_VERSION_NUMBER DIAL_VERSION_NUMBER_STR(DIAL_VERSION_MAJOR) "." DIAL_VERSION_NUMBER_STR(DIAL_VERSION_MINOR) "." DIAL_VERSION_NUMBER_STR(DIAL_VERSION_PATCH)
|
||||
|
||||
#undef DIAL_VERSION_STRING
|
||||
#ifdef DIAL_VERSION_SUFFIX
|
||||
# define DIAL_VERSION_STRING DIAL_VERSION_NUMBER "-" DIAL_VERSION_SUFFIX
|
||||
#else
|
||||
# define DIAL_VERSION_STRING DIAL_VERSION_NUMBER
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
66
build/dial_build.sh
Executable file
66
build/dial_build.sh
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# (c) 1997-2012 Netflix, Inc. All content herein is protected by
|
||||
# U.S. copyright and other applicable intellectual property laws and
|
||||
# may not be copied without the express permission of Netflix, Inc.,
|
||||
# which reserves all rights. Reuse of any of this content for any
|
||||
# purpose without the permission of Netflix, Inc. is strictly
|
||||
# prohibited.
|
||||
|
||||
BUILD_PREFIX="DIAL"
|
||||
BUILD_MAJOR=
|
||||
BUILD_MINOR=
|
||||
BUILD_PATCH=
|
||||
BUILD_SUFFIX=
|
||||
BUILD_NUMBER=
|
||||
COPY_SOURCE_VERSION_H=
|
||||
|
||||
if [ -n "${P4_CHANGELIST}" ]; then
|
||||
#echo "Using information from Jenkins environment to determine RELEASE number: $P4_CHANGELIST"
|
||||
BUILD_NUMBER="${P4_CHANGELIST}"
|
||||
fi
|
||||
|
||||
if [ -z "$COPY_SOURCE_VERSION_H" ]; then
|
||||
VERSION_H="Version.h"
|
||||
COPY_SOURCE_VERSION_H=`find ${COPY_SOURCE_DIR} -name ${VERSION_H}`
|
||||
if [ -z "$COPY_SOURCE_VERSION_H" ]; then
|
||||
echo "${VERSION_H} cannot be found!"
|
||||
exit 1
|
||||
elif echo "$COPY_VERSION" | grep --quiet ' '; then
|
||||
echo "Too many ${VERSION_H} found!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
BUILD_MAJOR=`grep -m1 -i "^# *define *${BUILD_PREFIX}_VERSION_MAJOR" "$COPY_SOURCE_VERSION_H" | sed "s,/[/*].*$,," | awk '{print $(NF)}'`
|
||||
if [ -z "$BUILD_MAJOR" ]; then
|
||||
echo "Failed to determine version major of current source." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD_MINOR" ]; then
|
||||
BUILD_MINOR=`grep -m1 -i "^# *define *${BUILD_PREFIX}_VERSION_MINOR" "$COPY_SOURCE_VERSION_H" | sed "s,/[/*].*$,," | awk '{print $(NF)}'`
|
||||
if [ -z "$BUILD_MINOR" ]; then
|
||||
echo "Failed to determine version minor of current source." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD_PATCH" ]; then
|
||||
BUILD_PATCH=`grep -m1 -i "^# *define *${BUILD_PREFIX}_VERSION_PATCH" "$COPY_SOURCE_VERSION_H" | sed "s,/[/*].*$,," | awk '{print $(NF)}'`
|
||||
if [ -z "$BUILD_PATCH" ]; then
|
||||
echo "Failed to determine version minor of current source." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
BUILD_STRING="${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}-${BUILD_NUMBER}"
|
||||
echo "${BUILD_STRING}"
|
||||
|
||||
tar czvhf ${WORKSPACE}/DIAL-$BUILD_STRING.tar.gz *
|
||||
|
||||
# Package the binaries
|
||||
cp ${WORKSPACE}/src/dial/client/dialclient ${WORKSPACE}/build
|
||||
cp ${WORKSPACE}/src/dial/server/dialserver ${WORKSPACE}/build
|
||||
cd ${WORKSPACE}/build
|
||||
tar czvhf ${WORKSPACE}/DIAL-$BUILD_STRING-binaries.tar.gz *
|
||||
Reference in New Issue
Block a user