Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
6ae0915c
Commit
6ae0915c
authored
Aug 15, 2019
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add option to change prerelease suffix
parent
d1158ea6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
release.sh
scripts/release/release.sh
+9
-6
No files found.
scripts/release/release.sh
View file @
6ae0915c
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
# Exit script as soon as a command fails.
# Exit script as soon as a command fails.
set
-o
errexit
set
-o
errexit
# Default the prerelease version suffix to rc
:
${
PRERELEASE_SUFFIX
:
=rc
}
log
()
{
log
()
{
# Print to stderr to prevent this from being 'returned'
# Print to stderr to prevent this from being 'returned'
echo
"
$@
"
>
/dev/stderr
echo
"
$@
"
>
/dev/stderr
...
@@ -14,7 +17,7 @@ current_version() {
...
@@ -14,7 +17,7 @@ current_version() {
current_release_branch
()
{
current_release_branch
()
{
v
=
"
$(
current_version
)
"
v
=
"
$(
current_version
)
"
echo
"release-
${
v
%%-
rc
.*
}
"
echo
"release-
${
v
%%-
"
$PRERELEASE_SUFFIX
"
.*
}
"
}
}
assert_current_branch
()
{
assert_current_branch
()
{
...
@@ -86,8 +89,8 @@ if [[ "$*" == "start minor" ]]; then
...
@@ -86,8 +89,8 @@ if [[ "$*" == "start minor" ]]; then
# Create temporary release branch
# Create temporary release branch
git checkout
-b
release-temp
git checkout
-b
release-temp
# This bumps minor and adds
rc
suffix, commits the changes, and tags the commit
# This bumps minor and adds
prerelease
suffix, commits the changes, and tags the commit
npm version preminor
--preid
=
rc
npm version preminor
--preid
=
"
$PRERELEASE_SUFFIX
"
# Rename the release branch
# Rename the release branch
git branch
--move
"
$(
current_release_branch
)
"
git branch
--move
"
$(
current_release_branch
)
"
...
@@ -99,18 +102,18 @@ elif [[ "$*" == "rc" ]]; then
...
@@ -99,18 +102,18 @@ elif [[ "$*" == "rc" ]]; then
assert_current_branch
"
$(
current_release_branch
)
"
assert_current_branch
"
$(
current_release_branch
)
"
# Bumps
rc
number, commits and tags
# Bumps
prerelease
number, commits and tags
npm version prerelease
npm version prerelease
push_and_publish next
push_and_publish next
elif
[[
"
$*
"
==
"final"
]]
;
then
elif
[[
"
$*
"
==
"final"
]]
;
then
# Update changelog release date, remove
rc
suffix, tag, push to git, publish in npm, remove next dist-tag
# Update changelog release date, remove
prerelease
suffix, tag, push to git, publish in npm, remove next dist-tag
log
"Creating final release"
log
"Creating final release"
assert_current_branch
"
$(
current_release_branch
)
"
assert_current_branch
"
$(
current_release_branch
)
"
# This will remove the
-rc
suffix from the version
# This will remove the
prerelease
suffix from the version
npm version patch
npm version patch
push_release_branch_and_tag
push_release_branch_and_tag
...
...
Write
Preview
Markdown
is supported
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