Skip to content

Commit

Permalink
Merge pull request #12 from deref/version-bump
Browse files Browse the repository at this point in the history
Add version bump script
  • Loading branch information
kendru authored Jul 19, 2021
2 parents 050cbad + 80c5d2f commit 8040b0d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.07.16_4
2021.07.19
5 changes: 5 additions & 0 deletions doc/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Release Process

exo uses GitHub actions to publish a new release of Exo any time the `core/VERSION` file changes. exo follows a (CalVer)[https://calver.org/] versioning scheme in which each release version adheres to the following scheme: `YYYY.MM.DD_MICRO` where the `_MICRO` suffix is only present if there have been multiple releases on a single day.

To trigger a new build, increment the version with: `./scripts/increment-version.sh`.
21 changes: 21 additions & 0 deletions script/incrment-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/env bash

## Updates the version for release.

## TODO: Disallow when there are staged changes

ROOTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd )"

currentversion="$(cat "${ROOTDIR}/core/VERSION")"
version="$(date -u +'%Y.%m.%d')"
if [[ "$currentversion" == "${version}"* ]]; then
lastbuild="${currentversion#*_}"
if [[ "$lastbuild" == "$currentversion" ]]; then
version="${version}_1"
else
version="${version}_$((lastbuild+1))"
fi
fi

echo -n "$version" > "${ROOTDIR}/core/VERSION"

0 comments on commit 8040b0d

Please sign in to comment.