Skip to content

Commit 0a88a38

Browse files
🪲 User tests publishing flow hotfix (LayerZero-Labs#994)
1 parent fcce23b commit 0a88a38

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

‎docker-compose.registry.yaml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,30 @@ services:
5757
- /bin/bash
5858
- -c
5959
- |
60+
# First we configure the registry and provide a fake mock token
6061
pnpm config set registry http://npm-registry:4873/
6162
pnpm config set //npm-registry:4873/:_authToken MOCK_TOKEN
62-
pnpm build
63+
64+
# Then we build the packages (we don't need to build the tests or examples)
65+
pnpm build --filter='./packages/*'
66+
67+
# Now we publish the packages
68+
#
69+
# FIXME This will publish the packages under their current versions, not taking any changesets into account.
70+
# Taking changesets into account comes with a convoluted issue:
71+
#
72+
# Once changesets are applied, package.json files are updated. These changes are not propagated to the repository
73+
# from which the examples are being cloned though. So even though the packages will be updated & published,
74+
# examples contained in the repository will hold references to their old versions
75+
#
76+
# The solution is to serve these changes out of a local git repository - very much possible
77+
# with one blocker - tiged, an NPM package we use to clone the examples, can only work with github repositories
78+
# and does not support e.g. local git repositories as sources
79+
pnpm release:publish
80+
81+
# Now we apply changesets and publish the new versions
82+
#
83+
# This step can remain after the above step has been removed and the cloning logic updated
6384
pnpm release:version
6485
pnpm release:publish
6586
volumes:
@@ -94,11 +115,17 @@ services:
94115
- /bin/bash
95116
- -c
96117
- |
118+
# First we configure the registry
97119
pnpm config set registry http://npm-registry:4873/
98120
99-
echo "create-lz-oapp:repository ${LAYERZERO_EXAMPLES_REPOSITORY_URL}"
100-
echo "create-lz-oapp:ref ${LAYERZERO_EXAMPLES_REPOSITORY_REF}"
121+
# Then we provide some debug information
122+
#
123+
# Not the double $$ that makes docker compose not interpolate these from environment variables
124+
# present on the host machine - instead, we'll get the actual container environment values
125+
echo "create-lz-oapp:repository $${LAYERZERO_EXAMPLES_REPOSITORY_URL}"
126+
echo "create-lz-oapp:ref $${LAYERZERO_EXAMPLES_REPOSITORY_REF}"
101127
128+
# Now we run the user tests
102129
/app/tests-user/lib/bats-core/bin/bats --verbose-run --recursive ./tests-user/tests
103130
volumes:
104131
# If we want to clone from github.com, we'll need its public keys added to our SSH config

0 commit comments

Comments
 (0)