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
3dd9d8af
Commit
3dd9d8af
authored
3 years ago
by
Andrew Coward
Browse files
Options
Downloads
Patches
Plain Diff
Updated sette functions to work correctly after multiple commits
parent
b6ca5510
No related branches found
Branches containing commit
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
+16
-7
16 additions, 7 deletions
sette/sette_eval.sh
sette/sette_rpt.sh
+14
-7
14 additions, 7 deletions
sette/sette_rpt.sh
with
31 additions
and
15 deletions
sette/all_functions.sh
+
1
−
1
View file @
3dd9d8af
...
...
@@ -172,7 +172,7 @@ clean_config() {
# define validation dir
set_valid_dir
()
{
#REVISION_NB=`${SVN_CMD} info ${SETTE_DIR}/.. | grep "Last Changed Rev" | awk '{print $NF}'`
REVISION_NB
=
`
git rev-list
--abbrev-commit
origin
`
REVISION_NB
=
`
git rev-list
--abbrev-commit
origin
|
tail
-1l
`
if
[
${#
REVISION_NB
}
-eq
0
]
then
echo
"some problems with
${
SVN_CMD
}
info command"
...
...
This diff is collapsed.
Click to expand it.
sette/sette_eval.sh
+
16
−
7
View file @
3dd9d8af
...
...
@@ -234,13 +234,18 @@ function runcmpres(){
# Show current revision tag and branch name
#
if
[
${
quiet
}
-eq
0
]
;
then
echo
""
;
fi
#lastchange=`${SVN_CMD} info ${MAIN_DIR} | grep 'Last Changed Rev' | awk '{print $NF}'`
lastchange
=
`
git rev-list
--abbrev-commit
origin
`
#revision=`${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'`
revision
=
`
git rev-list
--abbrev-commit
origin
`
localchanges
=
`
git status
--short
-uno
|
wc
-l
`
revision
=
`
git rev-list
--abbrev-commit
origin |
tail
-1l
`
branchname
=
`
${
SVN_CMD
}
info
${
MAIN_DIR
}
|
grep
^URL |
awk
-F
ipsl/forge/projets/nemo/svn/
'{print $NF}'
`
if
[
${
quiet
}
-eq
0
]
;
then
echo
"Current code is :
$branchname
@
$revision
( last change @
$lastchange
)"
;
fi
#[ `${SVN_CMD} status -q ${MAIN_DIR}/{cfgs,tests,src} | wc -l` -ge 1 ] && lastchange=${lastchange}+
if
[
${
quiet
}
-eq
0
]
;
then
if
[
$localchanges
>
0
]
;
then
echo
"Current code is :
$branchname
@
$revision
( with local changes )"
lastchange
=
${
revision
}
_++
else
echo
"Current code is :
$branchname
@
$revision
"
lastchange
=
$revision
fi
fi
# by default use the current lastchanged revision
lastchange
=
${
rev
:-
$lastchange
}
...
...
@@ -249,7 +254,11 @@ if [ ${quiet} -eq 0 ] ; then
echo
""
echo
"SETTE evaluation for : "
echo
""
echo
"
$branchname
@
$lastchange
(last changed revision)"
if
[
$localchanges
>
0
]
;
then
echo
"
$branchname
@
$revision
(with local changes)"
else
echo
"
$branchname
@
$revision
"
fi
echo
""
echo
" on
$COMPILER
arch file"
echo
""
...
...
This diff is collapsed.
Click to expand it.
sette/sette_rpt.sh
+
14
−
7
View file @
3dd9d8af
...
...
@@ -541,13 +541,16 @@ function identictest(){
# Show current revision tag and branch name
#
echo
""
#lastchange=`${SVN_CMD} info ${MAIN_DIR} | grep 'Last Changed Rev' | awk '{print $NF}'`
lastchange
=
`
git rev-list
--abbrev-commit
origin
`
#revision=`${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'`
revision
=
`
git rev-list
--abbrev-commit
origin
`
localchanges
=
`
git status
--short
-uno
|
wc
-l
`
revision
=
`
git rev-list
--abbrev-commit
origin |
tail
-1l
`
branchname
=
`
${
SVN_CMD
}
info
${
MAIN_DIR
}
|
grep
^URL |
awk
-F
ipsl/forge/projets/nemo/svn/
'{print $NF}'
`
echo
"Current code is :
$branchname
@
$revision
( last change @
$lastchange
)"
#[ `${SVN_CMD} status -q ${MAIN_DIR}/{cfgs,tests,src} | wc -l` -ge 1 ] && lastchange=${lastchange}+
if
[
$localchanges
>
0
]
;
then
echo
"Current code is :
$branchname
@
$revision
( with local changes )"
lastchange
=
${
revision
}
_++
else
echo
"Current code is :
$branchname
@
$revision
"
lastchange
=
$revision
fi
# by default use the current lastchanged revision
lastchange
=
${
rev
:-
$lastchange
}
...
...
@@ -555,7 +558,11 @@ lastchange=${rev:-$lastchange}
echo
""
echo
"SETTE validation report generated for : "
echo
""
echo
"
$branchname
@
$lastchange
(last changed revision)"
if
[
$localchanges
>
0
]
;
then
echo
"
$branchname
@
$revision
(with local changes)"
else
echo
"
$branchname
@
$revision
"
fi
echo
""
echo
" on
$COMPILER
arch file"
echo
""
...
...
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