FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mage/scripts/get_mage_commit.sh at main · memgraph/mage · GitHub
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
memgraph
/
mage
Public archive
Notifications
You must be signed in to change notification settings
Fork
35
Star
331
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
mage
/
scripts
/
get_mage_commit.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
33 lines (28 loc) · 945 Bytes
Breadcrumbs
mage
/
scripts
/
get_mage_commit.sh
Copy path
File metadata and controls
executable file
·
33 lines (28 loc) · 945 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
31
32
33
#!
/bin/bash
INPUT_REF=
$1
CI_BRANCH=
$2
GITHUB_REF=
$3
#
Get the current tag, or branch if a tag doesn't exist
#
This is used later in image creation, so that the exact version of
#
the MAGE git repository can be checked out within the container,
#
when we run the script to convert to "dev" container
if
[
-z
"
$INPUT_REF
"
]
;
then
echo
"
No specific ref provided, using current branch/tag.
"
#
If no ref is provided, use the current branch or tag
tag=
$(
./scripts/get_tag.sh
)
else
echo
"
Using provided ref:
$INPUT_REF
"
tag=
"
$INPUT_REF
"
fi
#
If tag is empty, fallback to the branch name
if
[
-z
"
$tag
"
]
;
then
echo
"
No valid tag found; using branch name.
"
#
If CI_BRANCH is set (for PR events), use it; otherwise, use GITHUB_REF
if
[
-n
"
$CI_BRANCH
"
]
;
then
tag=
"
$CI_BRANCH
"
else
tag=
"
${GITHUB_REF
#
refs
/
heads
/
}
"
fi
fi
echo
"
Using tag/branch:
$tag
"
echo
"
MAGE_COMMIT=
${tag}
"
>>
$GITHUB_ENV
Back
|
FazBrowse Home
|
New Git URL