[ADD] release: support alpha and beta + build version

- missing version of alpha/beta
This commit is contained in:
Mathieu Benoit 2023-01-12 16:09:27 -05:00
parent 5b0ea51bb6
commit 32ff705087
3 changed files with 34 additions and 1 deletions

View file

@ -920,6 +920,16 @@ docker_build:
docker_build_release:
./script/docker/docker_build.sh --release
# build docker release alpha
.PHONY: docker_build_release_alpha
docker_build_release_alpha:
./script/docker/docker_build.sh --release_alpha
# build docker release beta
.PHONY: docker_build_release_beta
docker_build_release_beta:
./script/docker/docker_build.sh --release_beta
# docker clean all
.PHONY: docker_clean_all
docker_clean_all:

View file

@ -198,3 +198,9 @@ To generate a list of differences between repo git commit
```bash
./script/git/git_change_remote.py --sync_to /path/to/directory
```
## Semantic versioning
```
<valid semver> ::= <version core> "-" <pre-release> "+" <build>
```

View file

@ -3,6 +3,8 @@
ARGS=""
IS_RELEASE=false
IS_RELEASE_ALPHA=false
IS_RELEASE_BETA=false
ERPLIBRE_DOCKER_BASE="technolibre/erplibre-base"
ERPLIBRE_DOCKER_PROD="technolibre/erplibre"
@ -14,15 +16,30 @@ do
elif [ "$arg" == "--release" ]
then
IS_RELEASE=true
elif [ "$arg" == "--release_alpha" ]
then
IS_RELEASE_ALPHA=true
elif [ "$arg" == "--release_beta" ]
then
IS_RELEASE_BETA=true
fi
done
if [ "$IS_RELEASE" == false ]
if [ "$IS_RELEASE_ALPHA" == true ]
then
# Add commit hash when release alpha
ERPLIBRE_VERSION="${ERPLIBRE_VERSION}_ALPHA_$(git rev-parse --short HEAD)"
elif [ "$IS_RELEASE_BETA" == true ]
then
# Add commit hash when release beta
ERPLIBRE_VERSION="${ERPLIBRE_VERSION}_BETA_$(git rev-parse --short HEAD)"
elif [ "$IS_RELEASE" == false ]
then
# Add commit hash when not a release
ERPLIBRE_VERSION="${ERPLIBRE_VERSION}_$(git rev-parse --short HEAD)"
fi
ERPLIBRE_DOCKER_BASE_VERSION="${ERPLIBRE_DOCKER_BASE}:${ERPLIBRE_VERSION}"
ERPLIBRE_DOCKER_PROD_VERSION="${ERPLIBRE_DOCKER_PROD}:${ERPLIBRE_VERSION}"