we don't need BUILD_TIMESTAMP either
This commit is contained in:
parent
27bd226f2b
commit
7a54154d45
|
@ -19,9 +19,6 @@ RUN apk add --no-cache dcron php81 php81-fpm php81-phar php81-sockets \
|
||||||
/etc/php81/php-fpm.d/www.conf && \
|
/etc/php81/php-fpm.d/www.conf && \
|
||||||
mkdir -p /var/www ${SCRIPT_ROOT}/config.d
|
mkdir -p /var/www ${SCRIPT_ROOT}/config.d
|
||||||
|
|
||||||
ARG BUILD_TIMESTAMP
|
|
||||||
ENV BUILD_TIMESTAMP=${BUILD_TIMESTAMP}
|
|
||||||
|
|
||||||
ARG CI_COMMIT_BRANCH
|
ARG CI_COMMIT_BRANCH
|
||||||
ENV CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
|
ENV CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
|
||||||
|
|
||||||
|
|
|
@ -327,11 +327,11 @@ class Config {
|
||||||
if (empty($this->version)) {
|
if (empty($this->version)) {
|
||||||
$this->version["status"] = -1;
|
$this->version["status"] = -1;
|
||||||
|
|
||||||
if (getenv("BUILD_TIMESTAMP") && getenv("CI_COMMIT_SHORT_SHA")) {
|
if (getenv("CI_COMMIT_SHORT_SHA") && getenv("CI_COMMIT_TIMESTAMP")) {
|
||||||
|
|
||||||
$this->version["version"] = sprintf("%s-%s", getenv("BUILD_TIMESTAMP"), getenv("CI_COMMIT_SHORT_SHA"));
|
|
||||||
$this->version["branch"] = getenv("CI_COMMIT_BRANCH");
|
$this->version["branch"] = getenv("CI_COMMIT_BRANCH");
|
||||||
$this->version["timestamp"] = strtotime(getenv("CI_COMMIT_TIMESTAMP"));
|
$this->version["timestamp"] = strtotime(getenv("CI_COMMIT_TIMESTAMP"));
|
||||||
|
$this->version["version"] = sprintf("%s-%s", date("Y.m", $this->version["timestamp"]), getenv("CI_COMMIT_SHORT_SHA"));
|
||||||
$this->version["commit"] = getenv("CI_COMMIT_SHORT_SHA");
|
$this->version["commit"] = getenv("CI_COMMIT_SHORT_SHA");
|
||||||
$this->version["status"] = 0;
|
$this->version["status"] = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue