Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 78a5c328 authored by Jason Kridner's avatar Jason Kridner
Browse files

Versioning proposal

* I believe our next release should be considered 1.0. Only major
  releases should make incompatible URLs and I believe we should be free
  to do that for our next "release". This means we can be free to make a
  0.1 stable release if we want that remains URL compatible. I don't
  know why right now. I just feel we should be working towards 1.0,
  not 0.1 when we already have a release. Please feel free to reject.
* For non-tagged updates, I'm thinking the extra-version should be
  something like "wip" to show that it isn't published to the main
  documents site yet.
* I think we should pull the major/minor/extra from the tag, instead of
  branch, and expect it to be used appropriately.
* I know it isn't the prettiest thing, but having a date for the
  patchlevel is super easy to automate and super easy to understand. I
  trust Robert's experience on this.
* I don't know the real purpose of VERSION_TWEAK, but it will be updated
  in case of more than one commit in a day.
parent 41358051
Branches
Tags
No related merge requests found
...@@ -4,11 +4,11 @@ apk add git ...@@ -4,11 +4,11 @@ apk add git
apk add rsync apk add rsync
apk add date apk add date
export VER_LATEST_MAJOR=0 export VER_LATEST_MAJOR=1
export VER_LATEST_MINOR=1 export VER_LATEST_MINOR=0
export VER_LATEST_EXTRA=rc export VER_LATEST_EXTRA=wip
export PATCHLEVEL= export PATCHLEVEL=$(date +%Y%m%d)
export VERSION_TWEAK=$(date +%Y%m%d) $(( $(date "+10#%H * 60 + 10#%M") )) export VERSION_TWEAK=$(( $(date "+10#%H * 60 + 10#%M") ))
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
export VER_DIR=latest export VER_DIR=latest
...@@ -32,8 +32,13 @@ elif [ "$CI_COMMIT_BRANCH" != "" ]; then ...@@ -32,8 +32,13 @@ elif [ "$CI_COMMIT_BRANCH" != "" ]; then
export BRANCH_VER=($(echo $CI_COMMIT_BRANCH | tr "." "\n")) export BRANCH_VER=($(echo $CI_COMMIT_BRANCH | tr "." "\n"))
export VERSION_MAJOR=${BRANCH_VER[0]} export VERSION_MAJOR=${BRANCH_VER[0]}
export VERSION_MINOR=${BRANCH_VER[1]} export VERSION_MINOR=${BRANCH_VER[1]}
export EXTRAVERSION= export EXTRAVERSION=wip
elif [ "$CI_COMMIT_TAG" != "" ]; then elif [ "$CI_COMMIT_TAG" != "" ]; then
export TAG_SPLIT=($(echo $CI_COMMIT_TAG | tr "-" "\n"))
export TAG_VER=($(echo ${TAG_SPLIT[0]} | tr "." "\n"))
export VERSION_MAJOR=${TAG_VER[0]}
export VERSION_MINOR=${TAG_VER[1]}
export EXTRAVERSION=${TAG_SPLIT[1]}
export GIT_BRANCH=$(git branch -a --contains tags/$CI_COMMIT_TAG | grep origin | sed 's/.*origin\///') export GIT_BRANCH=$(git branch -a --contains tags/$CI_COMMIT_TAG | grep origin | sed 's/.*origin\///')
if [ "$GIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then if [ "$GIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
export VER_DIR=latest export VER_DIR=latest
...@@ -43,9 +48,6 @@ elif [ "$CI_COMMIT_TAG" != "" ]; then ...@@ -43,9 +48,6 @@ elif [ "$CI_COMMIT_TAG" != "" ]; then
export GITLAB_HOST=$CI_SERVER_HOST export GITLAB_HOST=$CI_SERVER_HOST
export PROJECT_BRANCH=$GIT_BRANCH export PROJECT_BRANCH=$GIT_BRANCH
export PROJECT_REPO=docs.beagleboard.io export PROJECT_REPO=docs.beagleboard.io
export VERSION_MAJOR=$VER_LATEST_MAJOR
export VERSION_MINOR=$VER_LATEST_MINOR
export EXTRAVERSION=$VER_LATEST_EXTRA
else else
export VER_DIR=$GIT_BRANCH export VER_DIR=$GIT_BRANCH
export PAGES_URL=https://docs.beagleboard.org export PAGES_URL=https://docs.beagleboard.org
...@@ -54,10 +56,6 @@ elif [ "$CI_COMMIT_TAG" != "" ]; then ...@@ -54,10 +56,6 @@ elif [ "$CI_COMMIT_TAG" != "" ]; then
export GITLAB_HOST=$CI_SERVER_HOST export GITLAB_HOST=$CI_SERVER_HOST
export PROJECT_BRANCH=$GIT_BRANCH export PROJECT_BRANCH=$GIT_BRANCH
export PROJECT_REPO=docs.beagleboard.io export PROJECT_REPO=docs.beagleboard.io
export BRANCH_VER=($(echo $GIT_BRANCH | tr "." "\n"))
export VERSION_MAJOR=${BRANCH_VER[0]}
export VERSION_MINOR=${BRANCH_VER[1]}
export EXTRAVERSION=
fi fi
else else
echo "***** Not on a branch or tag *****" echo "***** Not on a branch or tag *****"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment