Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Lethay
VuhDo
Commits
bc7c36eb
Commit
bc7c36eb
authored
5 years ago
by
Ivaria
Browse files
Options
Download
Email Patches
Plain Diff
Fix timestamp handling
parent
da483642
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
.release/release.sh
.release/release.sh
+4
-5
No files found.
.release/release.sh
View file @
bc7c36eb
#!/usr/bin/env bash
s
# release.sh generates a zippable addon directory from a Git or SVN checkout.
#
# This is free and unencumbered software released into the public domain.
...
...
@@ -56,11 +56,10 @@ fi
# svn date helper function
strtotime
()
{
value
=
$(
echo
"
$1
"
|
sed
-e
's/\([^+]*\)
\(
\+.*
\)
/\1/'
)
# datetime string w/o TZ
value
=
$(
echo
"
$1
"
|
sed
-e
's/\([^+]*\)
\+.*/\1/'
)
# datetime string w/o TZ
format
=
"
$2
"
# strptime string
date
-d
"
$value
"
+%s
}
# Script return code
...
...
@@ -440,8 +439,8 @@ set_info_svn() {
si_project_author
=
$(
awk
'/^Last Changed Author:/ { print $0; exit }'
<
"
$_si_svninfo
"
|
cut
-d
" "
-f4-
)
_si_timestamp
=
$(
awk
'/^Last Changed Date:/ { print $4,$5,$6; exit }'
<
"
$_si_svninfo
"
)
si_project_timestamp
=
$(
strtotime
"
$_si_timestamp
"
"%F %T %z"
)
si_project_date_iso
=
$(
TZ
=
printf
"%(%Y-%m-%dT%H:%M:%SZ)T"
"
$
_
si_timestamp
"
)
si_project_date_integer
=
$(
TZ
=
printf
"%(%Y%m%d%H%M%S)T"
"
$
_
si_timestamp
"
)
si_project_date_iso
=
$(
TZ
=
printf
"%(%Y-%m-%dT%H:%M:%SZ)T"
"
$si_
project_
timestamp
"
)
si_project_date_integer
=
$(
TZ
=
printf
"%(%Y%m%d%H%M%S)T"
"
$si_
project_
timestamp
"
)
# SVN repositories have no project hash.
si_project_hash
=
si_project_abbreviated_hash
=
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment