File tree Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 1515// Use release.sh's automation.
1616
1717// BREAKING.FEATURE.FIX
18- internal let __segment_version = " 1.0.1 "
18+ internal let __segment_version = " 1.0.2 "
Original file line number Diff line number Diff line change 3939 exit 1
4040fi
4141
42+ # check if `gh` tool has auth access.
43+ # command will return non-zero if not auth'd.
44+ authd=$( gh auth status -t)
45+ if [[ $? != 0 ]]; then
46+ echo " ex: $ gh auth login"
47+ exit 1
48+ fi
49+
4250# check that we're on the `main` branch
4351branch=$( git rev-parse --abbrev-ref HEAD)
44- if [ branch != ' main' ]
52+ if [ $ branch != ' main' ]
4553then
46- echo " The 'main' branch must be the current branch out to make a release."
54+ echo " The 'main' must be the current branch to make a release."
4755 echo " You are currently on: $branch "
4856 exit 1
4957fi
7078fi
7179
7280newVersion=" ${1% .* } .$(( ${1##* .} )) "
73- echo " $version "
74- echo " $newVersion "
81+ echo " Preparing to release $newVersion ..."
7582
7683vercomp $newVersion $version
7784case $? in
8693 exit 1
8794fi
8895
96+ read -r -p " Are you sure you want to release $newVersion ? [y/N] " response
97+ case " $response " in
98+ [yY][eE][sS]|[yY])
99+ ;;
100+ * )
101+ exit 1
102+ ;;
103+ esac
104+
89105# get the commits since the last release...
90106# note: we do this here so the "Version x.x.x" commit doesn't show up in logs.
91- changelog=git log --pretty=format:" - (%an) %s" $( git describe --tags --abbrev=0 @^) ..@
107+ changelog=$( git log --pretty=format:" - (%an) %s" $( git describe --tags --abbrev=0 @^) ..@)
92108tempFile=$( mktemp)
93109# write changelog to temp file.
94- echo $changelog >> $tempFile
110+ echo -e " $changelog " >> $tempFile
95111
96112# update sources/Segment/Version.swift
97113# - remove last line...
You can’t perform that action at this time.
0 commit comments