mirror of
https://github.com/elyby/accounts.git
synced 2024-12-23 22:00:06 +05:30
Remove version definition from the application and pass it on build time
This commit is contained in:
parent
5a8c2641c1
commit
b743cc69aa
@ -61,10 +61,22 @@ test:frontend:
|
||||
build:production:
|
||||
image: docker:latest
|
||||
stage: build
|
||||
variables:
|
||||
GA_ID: "UA-45299905-3"
|
||||
SENTRY_CDN: "https://088e7718236a4f91937a81fb319a93f6@sentry.ely.by/2"
|
||||
before_script:
|
||||
- docker login -u gitlab-ci -p $CI_BUILD_TOKEN registry.ely.by
|
||||
- export VERSION="${CI_COMMIT_TAG:-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA:0:7}}"
|
||||
- echo "$SSH_PRIVATE_KEY" > id_rsa
|
||||
- echo "$FRONTEND_ENV_CONFIG" > frontend/config/env.js
|
||||
- |
|
||||
echo "
|
||||
module.exports = {
|
||||
version: '$VERSION',
|
||||
ga: {id: '$GA_ID'},
|
||||
sentryCdn: "$SENTRY_CDN",
|
||||
};
|
||||
" > frontend/config/env.js
|
||||
- sed -i '' -e 's/{{PLACE_VERSION_HERE}}/$VERSION/g' common/config/config.php
|
||||
script:
|
||||
- export IMAGE_NAME="$CONTAINER_IMAGE:latest"
|
||||
- docker build --pull -t $IMAGE_NAME .
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
'version' => '1.1.25-dev',
|
||||
'version' => '{{PLACE_VERSION_HERE}}', // This will be replaced by build tool
|
||||
'vendorPath' => dirname(__DIR__, 2) . '/vendor',
|
||||
'components' => [
|
||||
'cache' => [
|
||||
|
Loading…
Reference in New Issue
Block a user