{"id":20216728,"url":"https://github.com/containerbase/runinstall","last_synced_at":"2025-04-10T15:13:17.998Z","repository":{"id":236926919,"uuid":"597432513","full_name":"containerbase/runinstall","owner":"containerbase","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-03T10:59:12.000Z","size":173,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T13:12:28.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/containerbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-04T14:36:02.000Z","updated_at":"2025-02-03T10:59:14.000Z","dependencies_parsed_at":"2024-04-29T09:37:27.456Z","dependency_job_id":"0830cca5-3e2e-4ce8-8d79-20c5d10440f9","html_url":"https://github.com/containerbase/runinstall","commit_stats":null,"previous_names":["containerbase/runinstall"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containerbase%2Fruninstall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containerbase%2Fruninstall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containerbase%2Fruninstall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containerbase%2Fruninstall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/containerbase","download_url":"https://codeload.github.com/containerbase/runinstall/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243205,"owners_count":21071054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T06:29:27.057Z","updated_at":"2025-04-10T15:13:17.973Z","avatar_url":"https://github.com/containerbase.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Runinstall\n\nRuninstall is a tool that detects the project version and installs it dynamically.\n\nRuninstall extracts version constraints of package managers, and utilizes Renovate and install-tool to generate commands to install the tool version that the project requires.\n\nReferences:\n1. Generate commands https://github.com/renovatebot/renovate/blob/main/lib/util/exec/containerbase.ts\n2. Install tool https://github.com/containerbase/base\n\nRuninstall Currently supported tools:\n1. mvn\n2. pipenv\n3. poetry\n4. gradle\n\n## Logic\n\n### Path matching\n\n- `RUNINSTALL_ENABLE_NO_GIT`: This variable is used when running locally. if set to `true`, It allows running tool update without any git repository. it will bypass `RUNINSTALL_INCLUDES` and `RUNINSTALL_EXCLUDES`\n- `RUNINSTALL_INCLUDES`: This variable indicates which repositories to detect. accepts a comma seperated list of strings for repository URLs (fallback to `RUNINSTALL_MATCH`)\n- `RUNINSTALL_EXCLUDES`: This variable indicates which repositories to exclude. accepts a comma seperated list of strings for repository URLs\n\nIf `RUNINSTALL_INCLUDES` is undefined, or does not match, or `RUNINSTALL_EXCLUDES` is matched, then all logic will be skipped. \nThe command will be passed through to `/usr/local/bin/${cmd}`.\n \nExample:\n\n```\nexport RUNINSTALL_INCLUDES=org_a,org_b\nmvn --version\n```\n\n`RUNINSTALL_MATCH` is deprecated and has been replaced by `RUNINSTALL_INCLUDES`.\n\n### Tool name checking\n\nIf any other command than the supported tools is used, the command will exit with an error.\n\nFor local development, the command can be overridden/hardcoded with `RUNINSTALL_CMD`.\n\nExample:\n\n```\nexport RUNINSTALL_CMD=mvn\nnode src/index.js --version\n```\n\n### History checking\n\nRuninstall will skip all remaining logic if the same command has been run in the same directory right immediately before.\nIt achieves this by writing the previous command to `/tmp/runinstall_history`.\n\nThis can be overridden by setting `RUNINSTALL_FORCE=1`, which means Runinstall will ignore the history.\n\n### Constraint extraction\n\nNext, Runinstall will attempt to extract constraints from the `cwd`.\n\n### Install command generation\n\nIf no constraints were found in the previous step, Runinstall will skip install command generation and not install anything.\nTo override this and instruct Runinstall to install every time, set `RUNINSTALL_ALWAYS_INSTALL=1`.\n\nRuninstall then maps constraints to install commands.\nThis may require access to a github.com token in order to fetch release lists.\n\nThe token is found from either:\n\n- `.gitAccessToken` in the file system in the current directory or a parent directory, or\n- From `RUNINSTALL_GITHUB_TOKEN` (used as a fallback)\n\n### Install command execution\n\nRuninstall will then shell out to execute each install command.\n\n### Command delegation\n\nFinally, runinstall will execute the desired command - passing all stdio through - before then logging the result and exiting.\n\n## Logging\n\nRuninstall does not log to standard output or error, because doing so will pollute the command output leading to text parsing errors.\nInstead, Runinstall sends its own logs to a remote CloudWatch Log Group if configured.\n\nConfiguration:\n\n- `RUNINSTALL_DEBUG`: If defined, logs will be output to console instead of, or in addition to, Cloudwatch\n- `RUNINSTALL_KEY_ID`/`RUNINSTALL_ACCESS_KEY`: AWS credentials necessary for the remote Cloudwatch service\n\nIf all the above are undefined then Runinstall won't log a thing.\n\nAt the end of an invocation, Runinstall creates a log like the following:\n\n```\n{\n  \"args\": [\n    \"install\"\n  ],\n  \"cmd\": \"poetry\",\n  \"cwd\": \"/tmp/ws-scm/poetry-project\",\n  \"installCommands\": [\n    \"install-tool python 3.10.11\",\n    \"install-tool poetry 1.4.2\"\n  ],\n  \"installSuccess\": true,\n  \"level\": \"info\",\n  \"message\": \"runinstall result\",\n  \"remote\": \"https://github.com/dawsonbooth/poetry-project\",\n  \"runSuccess\": true,\n  \"toolConstraints\": [\n    {\n      \"constraint\": \"\u003e=3.8,\u003c3.11\",\n      \"toolName\": \"python\"\n    },\n    {\n      \"constraint\": \"\u003e=0.12\",\n      \"toolName\": \"poetry\"\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainerbase%2Fruninstall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontainerbase%2Fruninstall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainerbase%2Fruninstall/lists"}