From 9f986287092650ed26c5435796e260dbda38b395 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Fri, 6 Dec 2019 16:44:05 -0800 Subject: [PATCH] Add script to extract the version from the header file and remove DOCKER_VERSION --- DOCKER_VERSION | 1 - makefile | 7 +++++-- tools/extract_version.sh | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 DOCKER_VERSION create mode 100644 tools/extract_version.sh diff --git a/DOCKER_VERSION b/DOCKER_VERSION deleted file mode 100644 index 18bb4182..00000000 --- a/DOCKER_VERSION +++ /dev/null @@ -1 +0,0 @@ -7.5.0 diff --git a/makefile b/makefile index ca3493eb..d43e09d8 100644 --- a/makefile +++ b/makefile @@ -30,7 +30,7 @@ uninstall: xargs rm -fv < build/install_manifest.txt tag: - git tag v"`cat DOCKER_VERSION`" + git tag v"`sh tools/extract_version.sh`" xcode: cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_TEST=1 -GXcode && open ixwebsocket.xcodeproj @@ -41,11 +41,14 @@ xcode_openssl: .PHONY: docker NAME := bsergean/ws -TAG := $(shell cat DOCKER_VERSION) +TAG := $(shell sh tools/extract_version.sh) IMG := ${NAME}:${TAG} LATEST := ${NAME}:latest BUILD := ${NAME}:build +print_version: + @echo 'IXWebSocket version =>' ${TAG} + docker_test: docker build -f docker/Dockerfile.debian -t bsergean/ixwebsocket_test:build . diff --git a/tools/extract_version.sh b/tools/extract_version.sh new file mode 100644 index 00000000..7e2376f4 --- /dev/null +++ b/tools/extract_version.sh @@ -0,0 +1,3 @@ +#/bin/sh + +grep VERSION ixwebsocket/IXWebSocketVersion.h | awk '{print $3}' | tr -d \"