Streamline versioning of cli and core into one

This commit is contained in:
ChaoticByte 2025-03-08 21:14:19 +01:00
parent 94a5aff260
commit b19eba0560
No known key found for this signature in database
6 changed files with 9 additions and 13 deletions

1
VERSION Normal file
View file

@ -0,0 +1 @@
2.0.0

View file

@ -8,15 +8,14 @@ OUTPUT_DIR="../dist"
function gobuild { function gobuild {
printf -- "-> ${GOOS}\t${GOARCH}\t${OUTPUT_FILE} " 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 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}" echo "Building ${NAME_BASE} into ${OUTPUT_DIR}"
@ -30,5 +29,5 @@ GOOS=linux GOARCH=arm64 OUTPUT_FILE=${NAME_BASE}_linux_arm64 gobuild
cd .. cd ..
printf -- "Creating tag cli${VERSION}_core${CORE_VERSION}" printf -- "Creating version tag"
git tag -f "cli${VERSION}_core${CORE_VERSION}" && printf "\t\t✔\n" git tag -f "v${VERSION}" -m "" && printf "\t\t✔\n"

View file

@ -1 +1 @@
2.0.1 2.0.0

View file

@ -68,7 +68,7 @@ lurch-dl --url string The url to the video
IP address might get banned from the servers. IP address might get banned from the servers.
default: 10.0 default: 10.0
Version: cli` + Version + "_core" + core.Version) Version: ` + core.Version)
} }
func CliParseArguments() (core.Arguments, CliOnlyArguments, error) { func CliParseArguments() (core.Arguments, CliOnlyArguments, error) {

View file

@ -1,3 +0,0 @@
package main
var Version = "dev"

View file

@ -1 +0,0 @@
1.1.1