Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
caisar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
caisar
Commits
ebd85184
Commit
ebd85184
authored
7 months ago
by
Julien Girard-Satabin
Browse files
Options
Downloads
Patches
Plain Diff
[ci] Guarding update date headers
parent
5fd5725a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-0
1 addition, 0 deletions
Makefile
update_headers.sh
+12
-3
12 additions, 3 deletions
update_headers.sh
with
13 additions
and
3 deletions
Makefile
+
1
−
0
View file @
ebd85184
...
@@ -48,6 +48,7 @@ DESCRIPTION="$(shell sed -n -e "p;n;:next;/^##/Q;p;n;b next" CHANGES.md | perl -
...
@@ -48,6 +48,7 @@ DESCRIPTION="$(shell sed -n -e "p;n;:next;/^##/Q;p;n;b next" CHANGES.md | perl -
release
:
release
:
@
echo
"Proceed to release CAISAR with release version
$(
TAG
)
? (y/n)?"
@
echo
"Proceed to release CAISAR with release version
$(
TAG
)
? (y/n)?"
@
read
yesno
;
test
"
$$
yesno"
=
y
@
read
yesno
;
test
"
$$
yesno"
=
y
@
bash update_headers.sh
@
echo
-n
$(
DESCRIPTION
)
@
echo
-n
$(
DESCRIPTION
)
@
echo
"Is the CHANGES.md correct for
$(
TAG
)
(y/n)?"
@
echo
"Is the CHANGES.md correct for
$(
TAG
)
(y/n)?"
@
read
yesno
;
test
"
$$
yesno"
=
y
@
read
yesno
;
test
"
$$
yesno"
=
y
...
...
This diff is collapsed.
Click to expand it.
update_headers.sh
+
12
−
3
View file @
ebd85184
#!/usr/bin/env bash
#!/usr/bin/env bash
set
-xe
#
set -xe
NEW_DATE
=
$(
date
"+%Y"
)
NEW_DATE
=
$(
date
"+%Y"
)
OLD_DATE
=
$(
date
-d
'1 year ago'
"+%Y"
)
OLD_DATE
=
$(
sed
"5q;d"
src/main.ml |
awk
'{print $4}'
)
find
.
\(
-type
d
-name
.git
-prune
\)
\(
-type
d
-name
._build
-prune
\)
-o
-type
f
-print0
| xargs
-0
sed
-i
's/(C) '
${
OLD_DATE
}
'/(C) '
${
NEW_DATE
}
'/g'
\ No newline at end of file
if
[
"
$OLD_DATE
"
!=
"
$NEW_DATE
"
]
;
then
echo
"Replacing
$OLD_DATE
by
$NEW_DATE
in headers."
find
.
\(
-type
d
-name
.git
-prune
\)
\(
-type
d
-name
._build
-prune
\)
-o
-type
f
-print0
| xargs
-0
sed
-i
's/(C) '
${
OLD_DATE
}
'/(C) '
${
NEW_DATE
}
'/g'
echo
"Done."
exit
0
else
echo
"Year
$OLD_DATE
in header src/main.ml is current date, no need to update the headers."
exit
0
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