Skip to content

Commit 3c427a1

Browse files
authored
Merge pull request #123 from samuelzedec/develop
feat: Adiciona um script pra gerar tags
2 parents b1d7d0d + 02c533b commit 3c427a1

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.dockerignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,7 @@ docs/
5454

5555
# OS específicos
5656
**/.DS_Store
57-
**/Thumbs.db
57+
**/Thumbs.db
58+
59+
# Bash
60+
tag-release.sh

tag-release.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [[ ! -f "Directory.Build.props" ]]; then
6+
echo "Erro: Directory.Build.props não encontrado"
7+
exit 1
8+
fi
9+
10+
VERSION=$(sed -n 's/.*<Version>\([^<]*\)<\/Version>.*/\1/p' Directory.Build.props)
11+
12+
if [[ -z "$VERSION" ]]; then
13+
echo "Erro: Versão não encontrada"
14+
exit 1
15+
fi
16+
17+
TAG="v${VERSION}"
18+
19+
echo "Tag: $TAG"
20+
21+
git pull origin main
22+
23+
git tag -a "$TAG" -m "Release version $VERSION"
24+
25+
echo "Tag $TAG criada localmente"

0 commit comments

Comments
 (0)