Skip to content

Commit

Permalink
feat: add version into manager-pai (apache#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
starsz committed Nov 28, 2020
1 parent 277ae59 commit 67b0bfb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v2.1-rc1
5 changes: 4 additions & 1 deletion api/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ set -ex
export ENV=local
pwd=`pwd`

VERSION=$(cat ./api/VERSION)
GIT_VERSION=$(git log -1 --pretty=format:%h)

rm -rf output && mkdir -p output/conf && mkdir -p output/dag-to-lua

# get dag-to-lua lib
Expand All @@ -29,7 +32,7 @@ if [[ ! -f "dag-to-lua-1.1/lib/dag-to-lua.lua" ]]; then
fi

# build
cd ./api && go build -o ../output/manager-api . && cd ..
cd ./api && go build -o ../output/manager-api -ldflags "-X main.Version=${VERSION}(${GIT_VERSION})" . && cd ..

cp ./api/conf/schema.json ./output/conf/schema.json
cp ./api/conf/conf.yaml ./output/conf/conf.yaml
Expand Down

0 comments on commit 67b0bfb

Please sign in to comment.