mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 17:41:05 +02:00
fix(*_release): Calculate TODAYS_VERSION in common.sh
This commit is contained in:
parent
1099dbe319
commit
5790b3e182
@ -7,9 +7,6 @@
|
||||
SCRIPT_ROOT=$(dirname $(readlink -f "$0"))
|
||||
. "${SCRIPT_ROOT}/common.sh" || exit 1
|
||||
|
||||
COREOS_EPOCH=1372636800 # Mon Jul 1 00:00:00 UTC 2013
|
||||
TODAYS_VERSION=$(( (`date +%s` - ${COREOS_EPOCH}) / 86400 ))
|
||||
|
||||
DEFINE_integer build "${TODAYS_VERSION}" \
|
||||
"Branch name (aka 'build'), should be days since 2013-7-1"
|
||||
DEFINE_integer branch 0 "Branch revision, should be 0"
|
||||
|
@ -315,6 +315,12 @@ fi
|
||||
# Full version string.
|
||||
COREOS_VERSION_STRING="${COREOS_BUILD}.${COREOS_BRANCH}.${COREOS_PATCH}"
|
||||
|
||||
# Calculate what today's build version should be, used by release
|
||||
# scripts to provide a reasonable default value. The value is the number
|
||||
# of days since COREOS_EPOCH, Mon Jul 1 00:00:00 UTC 2013
|
||||
readonly COREOS_EPOCH=1372636800
|
||||
TODAYS_VERSION=$(printf "%04d" $(( (`date +%s` - ${COREOS_EPOCH}) / 86400 )) )
|
||||
|
||||
# Load developer's custom settings. Default location is in scripts dir,
|
||||
# since that's available both inside and outside the chroot. By convention,
|
||||
# settings from this file are variables starting with 'CHROMEOS_'
|
||||
|
@ -7,10 +7,6 @@
|
||||
SCRIPT_ROOT=$(dirname $(readlink -f "$0"))
|
||||
. "${SCRIPT_ROOT}/common.sh" || exit 1
|
||||
|
||||
COREOS_EPOCH=1372636800 # Mon Jul 1 00:00:00 UTC 2013
|
||||
TODAYS_VERSION=$(( (`date +%s` - ${COREOS_EPOCH}) / 86400 ))
|
||||
TODAYS_VERSION=$(printf "%04d" "${TODAYS_VERSION}")
|
||||
|
||||
DEFINE_string master "master" "Manifest master branch to update."
|
||||
DEFINE_string branch "build-${TODAYS_VERSION}" \
|
||||
"Manifest branch, tag, or other ref to get version from."
|
||||
|
Loading…
x
Reference in New Issue
Block a user