MCPcopy Index your code
hub / github.com/ampproject/amphtml / writeVersionFiles

Function writeVersionFiles

build-system/tasks/dist.js:152–166  ·  view source on GitHub ↗

* Writes the verion.txt file. * @return {!Promise}

()

Source from the content-addressed store, hash-verified

150 * @return {!Promise}
151 */
152async function writeVersionFiles() {
153 // TODO: determine which of these are necessary and trim the rest via an I2D.
154 const paths = [
155 'dist',
156 'dist/v0',
157 'dist/v0/examples',
158 'dist.tools/experiments',
159 `dist.3p/${internalRuntimeVersion}`,
160 `dist.3p/${internalRuntimeVersion}/vendor`,
161 ].map((p) => path.join(...p.split('/'), 'version.txt'));
162
163 return Promise.all(
164 paths.map((p) => fs.outputFile(p, internalRuntimeVersion))
165 );
166}
167
168/**
169 * Build AMP experiments.js.

Callers 1

distFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected