Skip to content

Commit f942874

Browse files
committed
[chore](infra): Add infra scripts and templates
1 parent 61e9c8c commit f942874

File tree

6 files changed

+85
-0
lines changed

6 files changed

+85
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
infra/build

infra/.configure

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
#
3+
# Shell Script for developers configuration loading
4+
5+
# Set up git hooks directory locally
6+
git config core.hooksPath $(dirname $0)/hooks
7+
8+
# Set up git commit message template locally
9+
git config commit.template $(dirname $0)/templates/.gitmessage

infra/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
# Infrastructure and DevOps directory for shellunity
2+
3+
This directory is used to store DevOps files to help development of the functionalities
4+
of this package.
5+
6+
## How to use the default configuration and load them using the '.configure' file
7+
8+
In this directory there is a Shell Script called '.configure' for default configurations
9+
loading. Execute this script to load the configurations and use templates
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
#
3+
# Generate current release message based on active develop branch name
4+
5+
CURRENTVERSION=$(cat $(dirname $0)/../../docs/VERSION.md)
6+
LATESTVERSION=$(git describe --abbrev=0)
7+
GITLOG=$(git log "$LATESTVERSION...HEAD" --oneline)
8+
9+
echo "$CURRENTVERSION - [Summary]"
10+
echo ""
11+
echo "[Description]"
12+
echo ""
13+
14+
echo "## Added"
15+
echo "$(echo "$GITLOG" | grep -E "\[(feat|test)\]" | sed 's/^/- /')"
16+
echo ""
17+
18+
echo "## Changed"
19+
echo "$(echo "$GITLOG" | grep -E "\[(perf|docs)\]" | sed 's/^/- /')"
20+
echo ""
21+
22+
echo "## Fixed"
23+
echo "$(echo "$GITLOG" | grep -E "\[(fix)\]" | sed 's/^/- /')"
24+
echo ""
25+
26+
echo "## Removed"
27+
echo "$(echo "$GITLOG" | grep -E "\[(revert)\]" | sed 's/^/- /')"
28+
echo ""
29+
30+
echo "## Development"
31+
echo "$(echo "$GITLOG" | grep -E "\[(build|chore|refactor|style)\]" | sed 's/^/- /')"
32+
echo ""
33+

infra/scripts/version_check.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#
3+
# Check current version based on active develop branch name
4+
5+
CURRENTVERSION="3.0.0"
6+
7+
VERSIONDOC=$(cat docs/VERSION.md)
8+
9+
if [ "$VERSIONDOC" == "$CURRENTVERSION" ]; then
10+
echo "Version checked: $VERSIONDOC"
11+
exit 0
12+
else
13+
echo "Package version in VERSION.md file does not seem correct!"
14+
echo "Version from VERSION.md file: $VERSIONDOC"
15+
exit 1
16+
fi

infra/templates/.gitmessage

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This is a template - Commit messages following this will appear in the changelog of a new version
2+
# Use the following template for your commit:
3+
# [type](optional scope): [subject] [Resolve #IssueID]
4+
# --------------(One blank line)----------------------
5+
# [Type your commit message above]
6+
7+
# ** Type
8+
# Must be one of the following:
9+
# * build - Build related changes
10+
# * chore - Build process or auxiliary tool changes
11+
# * docs - Documentation only changes
12+
# * feat - A new feature
13+
# * fix - A bug fix
14+
# * perf - A code change that improves performance
15+
# * refactor - A code change that neither fixes a bug or adds a feature
16+
# * revert - Reverting things
17+
# * style - Markup, white-space, formatting, missing semi-colons...
18+
# * test - Adding missing tests

0 commit comments

Comments
 (0)