@@ -57,9 +57,30 @@ services:
57
57
- /bin/bash
58
58
- -c
59
59
- |
60
+ # First we configure the registry and provide a fake mock token
60
61
pnpm config set registry http://npm-registry:4873/
61
62
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
63
84
pnpm release:version
64
85
pnpm release:publish
65
86
volumes :
@@ -94,11 +115,17 @@ services:
94
115
- /bin/bash
95
116
- -c
96
117
- |
118
+ # First we configure the registry
97
119
pnpm config set registry http://npm-registry:4873/
98
120
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}"
101
127
128
+ # Now we run the user tests
102
129
/app/tests-user/lib/bats-core/bin/bats --verbose-run --recursive ./tests-user/tests
103
130
volumes :
104
131
# If we want to clone from github.com, we'll need its public keys added to our SSH config
0 commit comments