Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Datree
Commits
62f53e55
Unverified
Commit
62f53e55
authored
3 years ago
by
Dima Brusilovsky
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
build: add second tag with v for each release (#663)
parent
868b76f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/deploy_release_candidate.sh
+3
-2
scripts/deploy_release_candidate.sh
scripts/release.sh
+6
-1
scripts/release.sh
with
9 additions
and
3 deletions
+9
-3
scripts/deploy_release_candidate.sh
+
3
-
2
View file @
62f53e55
...
...
@@ -4,7 +4,7 @@ set -ex
MAJOR_VERSION
=
1
MINOR_VERSION
=
4
latestRcTag
=
$(
git tag
--sort
=
-version
:refname |
grep
-E
"^
v
${
MAJOR_VERSION
}
\.
${
MINOR_VERSION
}
.[0-9]+-rc"
|
head
-n
1 |
grep
--only-matching
"^
v
${
MAJOR_VERSION
}
\.
${
MINOR_VERSION
}
.[0-9]
\+
"
||
true
)
latestRcTag
=
$(
git tag
--sort
=
-version
:refname |
grep
-E
"^
${
MAJOR_VERSION
}
\.
${
MINOR_VERSION
}
.[0-9]+-rc"
|
head
-n
1 |
grep
--only-matching
"^
${
MAJOR_VERSION
}
\.
${
MINOR_VERSION
}
.[0-9]
\+
"
||
true
)
if
[
"
$latestRcTag
"
==
""
]
;
then
nextVersion
=
$MAJOR_VERSION
.
$MINOR_VERSION
.0
...
...
@@ -12,10 +12,11 @@ else
nextVersion
=
$(
echo
$latestRcTag
|
awk
-F
.
'{$NF = $NF + 1;} 1'
|
sed
's/ /./g'
)
fi
export
DATREE_BUILD_VERSION
=
$nextVersion
-rc
export
DATREE_BUILD_VERSION
=
$nextVersion
-rc
-dima-test
echo
$DATREE_BUILD_VERSION
git tag
$DATREE_BUILD_VERSION
-a
-m
"Generated tag from TravisCI for build
$TRAVIS_BUILD_NUMBER
"
git tag v
$DATREE_BUILD_VERSION
-a
-m
"Generated tag with v from TravisCI for build
$TRAVIS_BUILD_NUMBER
"
git push
--tags
curl
-sL
https://git.io/goreleaser |
GORELEASER_CURRENT_TAG
=
$DATREE_BUILD_VERSION
GO_BUILD_TAG
=
staging
VERSION
=
v
$GORELEASER_VERSION
bash
...
...
This diff is collapsed.
Click to expand it.
scripts/release.sh
+
6
-
1
View file @
62f53e55
...
...
@@ -2,11 +2,16 @@
set
-ex
release_tag
=
$RELEASE_VERSION
v_release_tag
=
v
$release_tag
git checkout
"
$release_tag
-rc"
git tag
$release_tag
-a
-m
"Generated tag from manual TravisCI for production build
$TRAVIS_BUILD_NUMBER
"
git push origin
$release_tag
# TODO: check if goreleaser pushes the tag itself (so no need to push here)
git tag
$v_release_tag
-a
-m
"Generated tag with v from manual TravisCI for production build
$TRAVIS_BUILD_NUMBER
"
git push origin
$release_tag
git push origin
$v_release_tag
export
DATREE_BUILD_VERSION
=
$release_tag
echo
$DATREE_BUILD_VERSION
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help