mirror of
https://github.com/logos-storage/codex-factory.git
synced 2026-01-02 13:03:07 +00:00
feat: version env. variable support
This commit is contained in:
parent
8769818ad8
commit
d566c52045
@ -1,7 +1,6 @@
|
||||
# Codex Factory
|
||||
|
||||
[](https://github.com/codex-storage/codex-factory/actions/workflows/test.yaml)
|
||||
[](https://swarm.ethereum.org/)
|
||||
[](https://github.com/RichardLitt/standard-readme)
|
||||
[](https://github.com/feross/standard)
|
||||

|
||||
@ -59,6 +58,7 @@ For more details see the `--help` page of the CLI and its commands.
|
||||
|
||||
You can omit the Codex version argument when running `codex-factory start` command if you specify it in one of the expected places:
|
||||
|
||||
- `CODEX_FACTORY_VERSION` env. variable
|
||||
- `package.json` placed in current working directory (cwd) under the `engines.codex` property.
|
||||
- `.codexfactory.json` placed in current working directory (cwd) with property `version`.
|
||||
|
||||
|
||||
@ -55,6 +55,10 @@ async function searchCodexFactory(): Promise<string | undefined> {
|
||||
}
|
||||
|
||||
export async function findCodexVersion(): Promise<string> {
|
||||
if (process.env.CODEX_FACTORY_VERSION) {
|
||||
return process.env.CODEX_FACTORY_VERSION
|
||||
}
|
||||
|
||||
const packageJson = await searchPackageJson()
|
||||
|
||||
if (packageJson) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user