Skip to content

Commit a0bfb88

Browse files
dawehnerjustafish
authored andcommitted
fix dist production (#704)
1 parent 409459d commit a0bfb88

1 file changed

Lines changed: 18 additions & 25 deletions

File tree

.circleci/config.yml

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,13 @@ jobs:
8888
machine: true
8989
steps:
9090
- setup-project
91+
- run:
92+
name: Buld projects
93+
command: yarn build
9194
- run:
9295
name: Run tests
9396
command: |
9497
docker exec -it drupal_admin_ui_drupal drush user:password admin admin
95-
yarn build
9698
REACT_APP_DRUPAL_BASE_URL=http://drupal NIGHTWATCH_LOGIN_admin_PASSWORD=admin yarn test
9799
- store_test_results:
98100
path: ~/project/packages/admin-ui/reports
@@ -113,57 +115,48 @@ jobs:
113115
machine: true
114116
steps:
115117
- setup-project
116-
117-
# This pushes to https://github.com/jsdrupal/drupal-admin-ui-dist
118-
# which is then distributed to https://packagist.org/packages/justafish/drupal-admin-ui
119118
- run:
120-
name: Fix permissions
121-
command: sudo chown -R circleci:circleci ~/project/packages/admin-ui/build
119+
name: Build admin-ui package
120+
command: yarn workspace @drupal/admin-ui build
122121
- run:
123122
name: Copy composer file
124123
command: cp ~/project/.circleci/drupal-admin-ui--composer.json ~/project/packages/admin-ui/build/composer.json
124+
# This pushes to https://github.com/jsdrupal/drupal-admin-ui-dist
125+
# which is then distributed to https://packagist.org/packages/justafish/drupal-admin-ui
125126
- commit-and-push:
126127
files: ~/project/packages/admin-ui/build
127128
destination_repo: git@github.com:jsdrupal/drupal-admin-ui-dist.git
128129
ssh_key_fingerprint: "82:b8:cc:fe:02:24:17:b1:31:ba:dc:30:e1:01:7a:df"
129-
130130
# This pushes to https://github.com/jsdrupal/drupal-admin-ui-support-dist
131131
# which is then distributed at https://packagist.org/packages/justafish/drupal-admin-ui-support
132-
- run:
133-
name: Fix permissions
134-
command: sudo chown -R circleci:circleci ~/project/admin_ui_support
135132
- commit-and-push:
136133
files: ~/project/admin_ui_support
137134
destination_repo: git@github.com:jsdrupal/drupal-admin-ui-support-dist.git
138135
ssh_key_fingerprint: "6c:c9:15:82:34:e7:30:e2:91:1b:ea:e2:06:b2:cf:e0"
139-
140136
# This builds to https://github.com/jsdrupal/drupal-admin-ui-demo for the composer create-project demo
141137
# which is distributed from https://packagist.org/packages/jsdrupal/drupal-admin-ui-demo
142138
- run:
143139
name: Reset composer.json and composer.lock
144140
command: |
145-
docker exec -it drupal_admin_ui_drupal rm -f composer.json composer.lock
146-
docker exec -it drupal_admin_ui_drupal cp templates/composer.json composer.json
147-
docker exec -it drupal_admin_ui_drupal cp templates/composer.lock composer.lock
148-
docker exec -it drupal_admin_ui_drupal rm -rf templates
141+
rm -f composer.json composer.lock
142+
cp templates/composer.json composer.json
143+
cp templates/composer.lock composer.lock
144+
rm -rf templates
149145
# Reset vfancy, otherwise composer will complain that "The .git directory is missing from docroot/vfancy"
150146
# and won't run update
151147
- run:
152148
name: Reset vfancy
153149
command: |
154-
docker exec -it drupal_admin_ui_drupal rm -rf docroot/vfancy/*
155-
docker exec -it drupal_admin_ui_drupal /bin/sh -c "cd docroot/vfancy && \
156-
git init && \
157-
git remote add origin https://github.com/jsdrupal/drupal-admin-ui-dist.git && \
158-
git remote add composer https://github.com/jsdrupal/drupal-admin-ui-dist.git && \
159-
git fetch origin && \
160-
git reset --hard origin/master"
150+
rm -rf docroot/vfancy/*
151+
cd docroot/vfancy
152+
git init
153+
git remote add origin https://github.com/jsdrupal/drupal-admin-ui-dist.git
154+
git remote add composer https://github.com/jsdrupal/drupal-admin-ui-dist.git
155+
git fetch origin
156+
git reset --hard origin/master
161157
- run:
162158
name: Refresh composer.lock to point to new admin-ui-support commit
163159
command: docker exec -it drupal_admin_ui_drupal composer update justafish/drupal-admin-ui-support --lock
164-
- run:
165-
name: Fix permissions
166-
command: sudo chown -R circleci:circleci ~/project/demo
167160
- commit-and-push:
168161
message: "Auto update from master"
169162
files: ~/project/demo

0 commit comments

Comments
 (0)