Skip to content

Commit badd1f1

Browse files
committed
FIX script since I upgraded my hard drive
Signed-off-by: Pascal Andy <[email protected]>
1 parent ea604e3 commit badd1f1

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

push_release.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
# This is specific to my local set up
22
source .env .
33

4-
# Set env_var before running this script:
5-
# GITHUB_TOKEN="3122133122133211233211233211233211322313123"
6-
74
# vars
8-
#
9-
GIT_REPO="https://github.com/pascalandy/docker-stack-this"
10-
GOPATH=${HOME}/go
5+
# GITHUB_TOKEN="3122133122133211233211233211233211322313123"
6+
user="pascalandy"
7+
git_repo="docker-stack-this"
8+
local_repo="/Volumes/960G/_pascalandy/11_FirePress/Github/github_pascalandy/docker-stack-this"
119

1210
# The tag must be ready to push on git remote
1311
#
14-
cd ${HOME}/Documents/Github/github_pascalandy/docker-stack-this && \
15-
12+
cd ${local_repo} && \
1613
git push --tags && \
1714

1815
# Find the latest tag
1916
#
2017
tag_version="$(
21-
git ls-remote --tags ${GIT_REPO} \
18+
git ls-remote --tags ${git_repo} \
2219
| cut -d$'\t' -f2 \
23-
| grep -E '^refs/tags/[0-9]+\.[0-9]+' \
2420
| cut -d/ -f3 \
25-
| sort -rV \
26-
| head -n1)" && \
21+
| tail -n1)" && \
2722
echo ${tag_version} && \
2823

2924
# Push release on GitHub like a boss
3025
# Requires: https://github.com/aktau/github-release
3126
#
3227
$GOPATH/bin/github-release release \
33-
--user firepress-org \
34-
--repo ${my_repo} \
28+
--user ${user} \
29+
--repo ${git_repo} \
3530
--tag ${tag_version} \
3631
--name ${tag_version} \
37-
--description "Refer to [CHANGELOG.md](https://github.com/pascalandy/docker-stack-this/blob/master/CHANGELOG.md) for all details about this release."
32+
--description "Refer to [CHANGELOG.md](https://github.com/pascalandy/docker-stack-this/blob/master/CHANGELOG.md) for details about this release."
33+
34+
35+
36+
$GOPATH/bin/github-release info \
37+
--user ${user} \
38+
--repo ${git_repo} \
39+
--tag ${tag_version}

0 commit comments

Comments
 (0)