mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Strip meta from sem version
This commit is contained in:
parent
5c40ce5195
commit
0721c0d7d4
3
.github/workflows/docker-build.yml
vendored
3
.github/workflows/docker-build.yml
vendored
@ -58,8 +58,7 @@ jobs:
|
||||
MAJOR=$(cat app/config/version.json | jq '.major' )
|
||||
MINOR=$(cat app/config/version.json | jq '.minor' )
|
||||
SUB=$(cat app/config/version.json | jq '.sub' )
|
||||
META=$(cat app/config/version.json | jq -r '.meta' )
|
||||
echo "::set-output name=version::$MAJOR.$MINOR.$SUB-$META"
|
||||
echo "::set-output name=version::$MAJOR.$MINOR.$SUB"
|
||||
|
||||
- name: Get branch tag
|
||||
id: branch
|
||||
|
@ -17,7 +17,6 @@ docker-build-dev:
|
||||
MAJOR=$(cat app/config/version.json | jq '.major' )
|
||||
MINOR=$(cat app/config/version.json | jq '.minor' )
|
||||
SUB=$(cat app/config/version.json | jq '.sub' )
|
||||
META=$(cat app/config/version.json | jq -r '.meta' )
|
||||
- |
|
||||
apk --no-cache add curl
|
||||
latest_tag=$(curl -s https://api.github.com/repos/docker/buildx/releases/latest | sed -Ene '/^ *"tag_name": *"(v.+)",$/s//\1/p')
|
||||
@ -33,7 +32,7 @@ docker-build-dev:
|
||||
script:
|
||||
- |
|
||||
tag=":$CI_COMMIT_REF_SLUG"
|
||||
VERSION="${MAJOR}.${MINOR}.${SUB}-${META}"
|
||||
VERSION="${MAJOR}.${MINOR}.${SUB}"
|
||||
- |
|
||||
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
|
||||
echo "Crafty Version: $VERSION"
|
||||
@ -72,7 +71,6 @@ docker-build-prod:
|
||||
MAJOR=$(cat app/config/version.json | jq '.major' )
|
||||
MINOR=$(cat app/config/version.json | jq '.minor' )
|
||||
SUB=$(cat app/config/version.json | jq '.sub' )
|
||||
META=$(cat app/config/version.json | jq -r '.meta' )
|
||||
- |
|
||||
apk --no-cache add curl
|
||||
latest_tag=$(curl -s https://api.github.com/repos/docker/buildx/releases/latest | sed -Ene '/^ *"tag_name": *"(v.+)",$/s//\1/p')
|
||||
@ -88,7 +86,7 @@ docker-build-prod:
|
||||
script:
|
||||
- |
|
||||
tag=""
|
||||
VERSION="${MAJOR}.${MINOR}.${SUB}-${META}"
|
||||
VERSION="${MAJOR}.${MINOR}.${SUB}"
|
||||
- |
|
||||
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
|
||||
echo "Crafty Version: $VERSION"
|
||||
|
@ -450,10 +450,9 @@ class Helpers:
|
||||
major = version_data.get("major", "?")
|
||||
minor = version_data.get("minor", "?")
|
||||
sub = version_data.get("sub", "?")
|
||||
meta = version_data.get("meta", "?")
|
||||
|
||||
# set some defaults if we don't get version_data from our helper
|
||||
version = f"{major}.{minor}.{sub}-{meta}"
|
||||
version = f"{major}.{minor}.{sub}"
|
||||
return str(version)
|
||||
|
||||
def encode_pass(self, password):
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"major": 4,
|
||||
"minor": 0,
|
||||
"sub": 16,
|
||||
"meta": "beta"
|
||||
"sub": 16
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user