Streamline versioning of cli and core into one
This commit is contained in:
parent
94a5aff260
commit
b19eba0560
6 changed files with 9 additions and 13 deletions
13
build-cli.sh
13
build-cli.sh
|
@ -8,15 +8,14 @@ OUTPUT_DIR="../dist"
|
|||
|
||||
function gobuild {
|
||||
printf -- "-> ${GOOS}\t${GOARCH}\t${OUTPUT_FILE} "
|
||||
go build -ldflags="-X 'main.Version=${VERSION}' -X 'github.com/ChaoticByte/lurch-dl/core.Version=${CORE_VERSION}'" -o "${OUTPUT_DIR}/${OUTPUT_FILE}" && printf "\t✔\n"
|
||||
go build -ldflags="-X 'github.com/ChaoticByte/lurch-dl/core.Version=${VERSION}'" -o "${OUTPUT_DIR}/${OUTPUT_FILE}" && printf "\t✔\n"
|
||||
}
|
||||
|
||||
read -r CORE_VERSION < "${CORE_DIR}/VERSION"
|
||||
|
||||
cd "${WORKDIR}"
|
||||
read -r VERSION < ./VERSION
|
||||
|
||||
NAME_BASE="lurchdl-cli_${VERSION}_core${CORE_VERSION}"
|
||||
cd "${WORKDIR}"
|
||||
|
||||
NAME_BASE="lurch-dl_v${VERSION}"
|
||||
|
||||
echo "Building ${NAME_BASE} into ${OUTPUT_DIR}"
|
||||
|
||||
|
@ -30,5 +29,5 @@ GOOS=linux GOARCH=arm64 OUTPUT_FILE=${NAME_BASE}_linux_arm64 gobuild
|
|||
|
||||
cd ..
|
||||
|
||||
printf -- "Creating tag cli${VERSION}_core${CORE_VERSION}"
|
||||
git tag -f "cli${VERSION}_core${CORE_VERSION}" && printf "\t\t✔\n"
|
||||
printf -- "Creating version tag"
|
||||
git tag -f "v${VERSION}" -m "" && printf "\t\t✔\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue