-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtag.sh
More file actions
32 lines (25 loc) · 713 Bytes
/
tag.sh
File metadata and controls
32 lines (25 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
set -e
git update-index -q --ignore-submodules --refresh
# Disallow unstaged changes in the working tree
if ! git diff-files --quiet --
then
echo >&2 "You have unstaged changes:"
git diff-files --name-status -r -- >&2
err=1
fi
# Disallow uncommitted changes in the index
if ! git diff-index --cached --quiet HEAD --ignore-submodules --
then
echo >&2 "Your index contains uncommitted changes:"
git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2
err=1
fi
if [ $err ]
then
echo >&2 "Please commit or stash them."
exit 1
fi
eval $(cat .env)
git tag -af "$AKENEO_VERSION" -m "Tagging $AKENEO_VERSION"
git push -f origin "$AKENEO_VERSION"