/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
scripts/rust-fingerprint.js
20 строк
750 B
Benjamin Woodruff
[ci] Reduce usage of turborepo cache in `build_and_deploy.yml` (#94319)
11 июн 2026, 00:23
Не верифицирован
11 июн 2026, 00:23
3caee03
Код
Авторство
О чём код?
#!/usr/bin/env node // Write the turbo-computed TURBO_HASH to a stamp file. // This is used as a turbo task whose only purpose is to compute // a fingerprint of all Rust inputs. The build_and_deploy workflow // reads this stamp to derive the actions/cache key for the compiled // next-swc native binary without re-hashing everything. const fs = require('fs') const path = require('path') const stamp = path.resolve(__dirname, '..', 'target', '.rust-fingerprint') if (!process.env.TURBO_HASH) { console.log('rust-fingerprint: skipping (not running under turbo)') process.exit(0) } fs.mkdirSync(path.dirname(stamp), { recursive: true }) fs.writeFileSync(stamp, process.env.TURBO_HASH) console.log(`rust-fingerprint: ${process.env.TURBO_HASH}`)