Initial commit.
This commit is contained in:
17
scripts/README.md
Normal file
17
scripts/README.md
Normal 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
scripts/build.sh
Executable file
5
scripts/build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Metricator build script.
|
||||
|
||||
source ./scripts/shell_helpers/get_git_data.sh
|
7
scripts/shell_helpers/get_git_data.sh
Normal file
7
scripts/shell_helpers/get_git_data.sh
Normal 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
scripts/show_git_data.sh
Executable file
9
scripts/show_git_data.sh
Executable 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}"
|
Reference in New Issue
Block a user