Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Acme Downloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Geant DevOps
Acme Downloader
Commits
30138c04
Unverified
Commit
30138c04
authored
4 years ago
by
Massimiliano Adamo
Browse files
Options
Downloads
Patches
Plain Diff
fixing tags
parent
fe93c054
Branches
Branches containing commit
Tags
v1.0.7
Tags containing commit
No related merge requests found
Pipeline
#29620
passed
4 years ago
Stage: upload_linux_shell
Stage: upload_linux_amd64_binary
Stage: upload_windows_amd64_binary
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build.sh
+6
-7
6 additions, 7 deletions
build.sh
with
6 additions
and
7 deletions
build.sh
+
6
−
7
View file @
30138c04
...
...
@@ -11,10 +11,9 @@ unset GOBIN
BIN_NAME
=
acme-downloader
PATH
=
$PATH
:
$(
go
env
GOPATH
)
/bin
GOPATH
=
$(
go
env
GOPATH
)
#PROG_VERSION="1.0"
BUILDTIME
=
$(
date
-u
'+%Y-%m-%d_%H:%M:%S'
)
REPO_DIR
=
$(
dirname
$0
)
if
[
"
$REPO_DIR
"
=
'.'
]
;
then
if
[
[
"
$REPO_DIR
"
=
'.'
]
]
;
then
REPO_DIR
=
$(
pwd
)
fi
test
-L
"
${
GOPATH
}
/src/
${
REPO_DIR
}
"
||
ln
-sf
"
$REPO_DIR
"
"
${
GOPATH
}
/src/"
...
...
@@ -72,18 +71,18 @@ while true; do
shift
done
if
[
-
z
$VERSION
]
;
then
PROG_VERSION
=
$(
git describe
--tags
$(
git rev-list
--tags
--max-count
=
1
)
|
tr
-d
v
)
if
[
[
-
n
$VERSION
]
]
;
then
PROG_VERSION
=
$(
echo
$VERSION
|
tr
-d
v
)
else
PROG_VERSION
=
$(
echo
$PROG_VERSION
|
tr
-d
v
)
PROG_VERSION
=
$(
git describe
--tags
$(
git rev-list
--tags
--max-count
=
1
)
|
tr
-d
v
)
fi
if
[
-z
$OS
]
||
[
-z
$ARCH
]
;
then
if
[
[
-z
$OS
]
]
||
[
[
-z
$ARCH
]
]
;
then
echo
-e
"
\n
You need to supply OS and Architecture
\n
"
usage
fi
if
[
"
$OS
"
==
"windows"
]
;
then
if
[
[
"
$OS
"
==
"windows"
]
]
;
then
BIN_NAME
=
"
${
BIN_NAME
}
.exe"
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment