forked from bitflight-devops/github-action-readme-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·30 lines (26 loc) · 867 Bytes
/
release.sh
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
#!/usr/bin/env bash
git pull
git fetch --tags
git push --tags
git push
bump="${1:-patch}"
newtag="$(git semver "${bump}" --dryrun)"
yarntag="$(jq -r '.version' package.json)"
if [[ ${yarntag} != "${newtag#v}" ]]; then
yarn version -i "${newtag#v}" || true
fi
yarn build
git add dist package.json yarn.lock .yarn
git commit -m "chore(release): bump version to ${newtag}" --no-verify
git semver "${bump}"
# newtag2="$(git semver get)"
# stub_major="${newtag%%\.*}"
# stub_major_minor="${newtag%\.*}"
# git tag -d "${stub_major}" 2>/dev/null || true
# git tag -d "${stub_major_minor}" 2>/dev/null || true
# git tag -a "${stub_major}" -m "Release ${newtag}"
# git tag -a "${stub_major_minor}" -m "Release ${newtag}"
# git push origin ":${stub_major}" 2>/dev/null || true
# git push origin ":${stub_major_minor}" 2>/dev/null || true
yarn postversion
yarn release:post