Change how build script reads version tag
This commit is contained in:
5
.github/workflows/jar.yaml
vendored
5
.github/workflows/jar.yaml
vendored
@@ -15,11 +15,8 @@ jobs:
|
|||||||
- name: Install JDK
|
- name: Install JDK
|
||||||
run: sudo apt install default-jdk
|
run: sudo apt install default-jdk
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
run: echo "RELEASE_VERSION=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: PKG_VER_TAG=$RELEASE_VERSION ./build.sh host-jar "release"
|
run: ./build.sh host-jar "release"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
11
build.sh
11
build.sh
@@ -505,9 +505,7 @@ host-jar()
|
|||||||
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
|
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
|
||||||
javac -Xlint:deprecation com/zerotier/sockets/*.java
|
javac -Xlint:deprecation com/zerotier/sockets/*.java
|
||||||
|
|
||||||
PKG_VER_TAG="${PKG_VER_TAG:-"$(git describe --abbrev=0)"}"
|
jar cf libzt-"$(cat .version)".jar $SHARED_LIB_NAME com/zerotier/sockets/*.class
|
||||||
|
|
||||||
jar cf libzt-$PKG_VER_TAG.jar $SHARED_LIB_NAME com/zerotier/sockets/*.class
|
|
||||||
rm -rf com $SHARED_LIB_NAME
|
rm -rf com $SHARED_LIB_NAME
|
||||||
cd -
|
cd -
|
||||||
# Copy JAR to dist/
|
# Copy JAR to dist/
|
||||||
@@ -726,6 +724,13 @@ clean()
|
|||||||
cd pkg/pypi && ./build.sh clean
|
cd pkg/pypi && ./build.sh clean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tag_release()
|
||||||
|
{
|
||||||
|
git tag -a $1 -m $2
|
||||||
|
"$(git describe --tags --abbrev=0)" >> .version
|
||||||
|
git push origin --tags
|
||||||
|
}
|
||||||
|
|
||||||
list()
|
list()
|
||||||
{
|
{
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user