Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
GOSI9esm
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Consortium Members
UKMO
GOSI
GOSI9esm
Commits
98bb7fe9
Commit
98bb7fe9
authored
2 years ago
by
Daley Calvert
Browse files
Options
Downloads
Patches
Plain Diff
#133- Use a consistent determination for the git hash in SETTE
parent
523d2737
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
sette/all_functions.sh
+1
-1
1 addition, 1 deletion
sette/all_functions.sh
sette/sette_eval.sh
+1
-3
1 addition, 3 deletions
sette/sette_eval.sh
sette/sette_rpt.sh
+1
-3
1 addition, 3 deletions
sette/sette_rpt.sh
with
3 additions
and
7 deletions
sette/all_functions.sh
+
1
−
1
View file @
98bb7fe9
...
...
@@ -172,7 +172,7 @@ clean_config() {
# define validation dir
set_valid_dir
()
{
if
[
${
DETACHED_HEAD
}
==
"no"
]
;
then
REVISION_NB
=
`
git
-C
${
MAIN_DIR
}
rev-
list
--abbrev-commit
HEAD |
head
-1l
`
REVISION_NB
=
`
git
-C
${
MAIN_DIR
}
rev-
parse
--short
HEAD
`
else
REVISION_NB
=
${
DETACHED_CMIT
}
fi
...
...
This diff is collapsed.
Click to expand it.
sette/sette_eval.sh
+
1
−
3
View file @
98bb7fe9
...
...
@@ -262,20 +262,18 @@ localchanges=`git status --short -uno | wc -l`
git branch
--show-current
>
& /dev/null
if
[[
$?
==
0
]]
;
then
branchname
=
"
$(
git branch
--show-current
)
"
revision
=
`
git rev-parse
--short
HEAD
`
if
[
-z
$branchname
]
;
then
# Probabably on a detached HEAD (possibly testing an old commit).
# Verify this and try to recover original commit
MORE_INFO
=
"
$(
git branch
-a
|
head
-1l
|
sed
-e
's/.*(//'
-e
's/)//'
)
"
if
[[
"
${
MORE_INFO
}
"
==
*
"detached"
*
]]
;
then
revision
=
$(
echo
\\
${
MORE_INFO
}
|
awk
'{print $NF}'
)
# There is no robust way to recover a branch name in a detached state
# so just use the commit with a prefix
branchname
=
"detached_"
${
revision
}
else
branchname
=
"Unknown"
fi
else
revision
=
`
git rev-list
--abbrev-commit
origin |
head
-1l
`
fi
else
branchname
=
"Unknown"
...
...
This diff is collapsed.
Click to expand it.
sette/sette_rpt.sh
+
1
−
3
View file @
98bb7fe9
...
...
@@ -580,20 +580,18 @@ localchanges=`git status --short -uno | wc -l`
git branch
--show-current
>
& /dev/null
if
[[
$?
==
0
]]
;
then
branchname
=
"
$(
git branch
--show-current
)
"
revision
=
`
git rev-parse
--short
HEAD
`
if
[
-z
$branchname
]
;
then
# Probabably on a detached HEAD (possibly testing an old commit).
# Verify this and try to recover original commit
MORE_INFO
=
"
$(
git branch
-a
|
head
-1l
|
sed
-e
's/.*(//'
-e
's/)//'
)
"
if
[[
"
${
MORE_INFO
}
"
==
*
"detached"
*
]]
;
then
revision
=
$(
echo
\\
${
MORE_INFO
}
|
awk
'{print $NF}'
)
# There is no robust way to recover a branch name in a detached state
# so just use the commit with a prefix
branchname
=
"detached_"
${
revision
}
else
branchname
=
"Unknown"
fi
else
revision
=
`
git rev-list
--abbrev-commit
HEAD |
head
-1l
`
fi
else
branchname
=
"Unknown"
...
...
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