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
35fe2285
Unverified
Commit
35fe2285
authored
3 years ago
by
Max Adamo
Browse files
Options
Downloads
Patches
Plain Diff
remove builtin variable
parent
3fafd559
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
acme-downloader.sh
+5
-5
5 additions, 5 deletions
acme-downloader.sh
build-bash.sh
+3
-3
3 additions, 3 deletions
build-bash.sh
build-go.sh
+3
-3
3 additions, 3 deletions
build-go.sh
with
11 additions
and
11 deletions
acme-downloader.sh
+
5
−
5
View file @
35fe2285
...
...
@@ -7,8 +7,8 @@
# the certificate will be checked, if it is valid, if the key matches
# and if it contains at least the cert-name
#
VERSION
=
"VERSION_SET_BY_CI"
BUILDTIME
=
"BUILDTIME_SET_BY_CI"
PROG_
VERSION
=
"VERSION_SET_BY_CI"
BUILD
_
TIME
=
"BUILDTIME_SET_BY_CI"
REDIS_URL
=
"https://redis.geant.org/GET"
VAULT_URL
=
"https://vault.geant.org/v1"
TMP_CERT
=
$(
mktemp
)
...
...
@@ -44,9 +44,9 @@ check_version() {
SCRIPT_URL
=
"https://artifactory.software.geant.org/artifactory/acme-downloader/acme-downloader.sh"
METADATA_URL
=
"https://artifactory.software.geant.org/artifactory/api/storage/acme-downloader/acme-downloader.sh?properties=version"
REMOTE_VERSION
=
$(
curl
-s
$METADATA_URL
| jq
-j
.properties.version[0]
)
if
[[
$VERSION
!=
$REMOTE_VERSION
]]
;
then
if
[[
$
PROG_
VERSION
!=
$REMOTE_VERSION
]]
;
then
echo
""
echo
"you are running version
${
VERSION
}
"
echo
"you are running version
${
PROG_
VERSION
}
"
echo
"version
$REMOTE_VERSION
is available"
echo
"in order to fetch and install the new version you can use the option: --update"
echo
""
...
...
@@ -170,7 +170,7 @@ done
# print version buildtime and say goodbye
if
[[
-n
$PROG_VERSION
]]
;
then
echo
"
$(
basename
$0
)
version
$VERSION
built on
${
BUILDTIME
}
"
echo
"
$(
basename
$0
)
version
$
PROG_
VERSION
built on
${
BUILD
_
TIME
}
"
clean_up 0
fi
...
...
This diff is collapsed.
Click to expand it.
build-bash.sh
+
3
−
3
View file @
35fe2285
...
...
@@ -3,9 +3,9 @@
# upload a copy of the script with version number and buildtime
#
if
[
"$#"
-gt
0
]
;
then
VERSION
=
$1
PROG_
VERSION
=
$1
else
VERSION
=
$(
git describe
--tags
$(
git rev-list
--tags
--max-count
=
1
)
|
tr
-d
v
)
PROG_
VERSION
=
$(
git describe
--tags
$(
git rev-list
--tags
--max-count
=
1
)
|
tr
-d
v
)
fi
AFACTORY_SCRIPT
=
"acme-downloader-afactory.sh"
BUILDTIME
=
$(
date
-u
'+%Y-%m-%d_%H:%M:%S'
)
...
...
@@ -17,5 +17,5 @@ fi
rm
-f
$AFACTORY_SCRIPT
cp
acme-downloader.sh
$AFACTORY_SCRIPT
sed
-i
s/VERSION_SET_BY_CI/
$VERSION
/
$AFACTORY_SCRIPT
sed
-i
s/VERSION_SET_BY_CI/
$
PROG_
VERSION
/
$AFACTORY_SCRIPT
sed
-i
s/BUILDTIME_SET_BY_CI/
$BUILDTIME
/
$AFACTORY_SCRIPT
This diff is collapsed.
Click to expand it.
build-go.sh
+
3
−
3
View file @
35fe2285
...
...
@@ -64,7 +64,7 @@ while true; do
;;
--version
)
shift
VERSION
=
"
$1
"
PROG_
VERSION
=
"
$1
"
;;
--
)
shift
...
...
@@ -74,8 +74,8 @@ while true; do
shift
done
if
[[
-n
$VERSION
]]
;
then
PROG_VERSION
=
$(
echo
$VERSION
|
tr
-d
v
)
if
[[
-n
$
PROG_
VERSION
]]
;
then
PROG_VERSION
=
$(
echo
$
PROG_
VERSION
|
tr
-d
v
)
else
PROG_VERSION
=
$(
git describe
--tags
$(
git rev-list
--tags
--max-count
=
1
)
|
tr
-d
v
)
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