Initial commit.

This commit is contained in:
2020-11-28 23:34:20 +05:00
commit cdf9997cfe
20 changed files with 475 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# Scripts directory
This directory contains various scripts that is used for whole application lifecycle - building, testing, deploying, etc.
**WARNING**: these scripts assuming that they're launched from root directory of project! Do not launch them like:
```shell
./some_stript.sh
```
Instead launch them from root directory like:
```shell
./scripts/some_script.sh
```
Otherwise your computer might explode. You were warned.
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Metricator build script.
source ./scripts/shell_helpers/get_git_data.sh
+7
View File
@@ -0,0 +1,7 @@
# Gets git data.
# Should be sourced where neccessary.
export BRANCHNAME=${BRANCHNAME:=$(git branch --no-color --show-current)}
export BUILDID=${BUILDID:=$(git rev-list HEAD --count)}
export COMMITHASH=${COMMITHASH:=$(git rev-parse --verify HEAD)}
export VERSION=${VERSION:="0.1.0-dev"}
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Showing git data in console.
source ./scripts/shell_helpers/get_git_data.sh
echo "* Branch: ${BRANCH}"
echo "* Build ID: ${BUILDID}"
echo "* Commit hash: ${COMMITHASH}"
echo "* Version: ${VERSION}"