Streamline versioning of cli and core into one
This commit is contained in:
parent
94a5aff260
commit
48694f84ed
6 changed files with 9 additions and 13 deletions
1
VERSION
Normal file
1
VERSION
Normal file
|
@ -0,0 +1 @@
|
||||||
|
2.0.0
|
13
build-cli.sh
13
build-cli.sh
|
@ -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"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2.0.1
|
2.0.0
|
|
@ -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) {
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
var Version = "dev"
|
|
|
@ -1 +0,0 @@
|
||||||
1.1.1
|
|
Loading…
Add table
Add a link
Reference in a new issue