{"id":13648949,"url":"https://github.com/lefou/millw","last_synced_at":"2025-07-17T11:31:30.161Z","repository":{"id":41402231,"uuid":"172791067","full_name":"lefou/millw","owner":"lefou","description":"Mill Wrapper Script","archived":true,"fork":false,"pushed_at":"2024-12-08T17:18:21.000Z","size":118,"stargazers_count":64,"open_issues_count":0,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T01:15:54.988Z","etag":null,"topics":["build-tool","mill","millw"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefou.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"lefou"}},"created_at":"2019-02-26T21:10:03.000Z","updated_at":"2024-12-08T17:31:45.000Z","dependencies_parsed_at":"2024-02-01T10:50:10.007Z","dependency_job_id":"77f0ec88-c75b-48cb-9fbd-bc750d0a505b","html_url":"https://github.com/lefou/millw","commit_stats":{"total_commits":110,"total_committers":17,"mean_commits":6.470588235294118,"dds":"0.26363636363636367","last_synced_commit":"7fdbe12f9263a27f3a8a3c74a4be59d8a3f58e58"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/lefou/millw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmillw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmillw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmillw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmillw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefou","download_url":"https://codeload.github.com/lefou/millw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmillw/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265600574,"owners_count":23795717,"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":["build-tool","mill","millw"],"created_at":"2024-08-02T01:04:39.753Z","updated_at":"2025-07-17T11:31:30.156Z","avatar_url":"https://github.com/lefou.png","language":"Shell","funding_links":["https://github.com/sponsors/lefou"],"categories":["Shell"],"sub_categories":[],"readme":"= Mill Wrapper Script\n:version: 0.4.12\n:example-mill-version: 0.11.6\n:mill-url: https://github.com/com-lihaoyi/mill\n:toc:\n:toc-placement: preamble\n:important-caption: :heavy_exclamation_mark:\n\nIMPORTANT: `millw` is now merged into the {mill-url}[official Mill repository].\n\nSmall script to automatically fetch and execute {mill-url}[mill build tool].\n\n\n== Installation\n\nOn any platform, you can download the `millw` (Mac / Linux) or `millw.bat` / `millw.ps1` (Windows) scripts found in this repo, into the root of your project.\nYou can then use the script file as a drop-in replacement for Mill.\n\nFor convenience on Mac and Linux, use your terminal to navigate to the root of your project, then run the following command:\n\n.Shell command to install `millw` into your project\n[source,sh,subs=\"attributes,verbatim\"]\n----\n$ curl -L https://raw.githubusercontent.com/lefou/millw/{version}/millw \u003e mill \u0026\u0026 chmod +x mill\n----\n\n\n== How it works\n\n`millw` is a small wrapper script around mill and works almost identical to mill.\nIt automatically downloads the correct mill version (into `${XDG_CACHE_HOME}/mill/download` or `~/.cache/mill/download` on Linux/Mac and `$Env:LOCALAPPDATA\\mill\\download` on Windows).\n\nI recommend to rename the tool to just `mill`.\nIt is designed to be a drop-in replacement for the official mill binary.\nThe project name and also the script name was primarily chosen to be `millw` to disambiguate references.\n\nThe mill version to be used will be determined by the following steps.\nThe search ends, after the first step that results in a version.\n\n* If the first parameter is `--mill-version`, the second parameter will be used as the mill version.\n+\n.Example\n[source,sh,subs=\"attributes,verbatim\"]\n----\nsh $ mill --mill-version {example-mill-version} --disable-ticker version\n{example-mill-version}\n----\n\n* If the environment variable `MILL_VERSION` is defined, its value will be used.\n+\n.Example\n[source,sh,subs=\"attributes,verbatim\"]\n----\nsh $ MILL_VERSION={example-mill-version} mill --disable-ticker version\n{example-mill-version}\n----\n\n* If there is a file `.mill-version` in the working directory, its content will be used as mill version.\n  The file must have only a mill version as content, no additional content or comments are supported.\n+\n.Example\n\n[source,sh,subs=\"attributes,verbatim\"]\n----\nsh $ echo -n \"{example-mill-version}\" \u003e .mill-version\nsh $ mill --disable-ticker version\n{example-mill-version}\n----\n\n* If there is a file `.config/mill-version`, its content will be used as mill version.\n\n* The latest mill release available from the Github release pages will be used.\n\n* If the environment variable `DEFAULT_MILL_VERSION` is set, its value will be used.\n\n* The values of the `DEFAULT_MILL_VERSION` variable inside the script will be used.\n\n== Use cases\n\n=== As mill executable\n\nIstead of installing mill, you can just place the script into you local `$HOME/bin` directory and rename it to `mill`.\n\nIf you need a special mill version in a project directory, just place a `.mill-version` file with the best mill version.\n\n.Example: setting mill {example-mill-version} as best local mill version\n[source,sh,subs=\"attributes,verbatim\"]\n----\nsh $ echo -n \"{example-mill-version}\" \u003e .mill-version\n----\n\n=== As a wrapper script in your project\n\nTo make the start for others easier or to always have the correct mill version in your CI environmentfootnote:[Continuous Integration environment],\nyou can just place a copy of the script as `millw` (for Windows `millw.bat`) in your project root directory.\n\nYou should change the `DEFAULT_MILL_VERSION` variable in that script to the correct version you want to use\nand add the file under version control.\n\n=== Add a target to update the `millw` script with mill\n\n[source,scala]\n----\n/**\n * Update the millw script.\n */\ndef millw() = T.command {\n  val target = mill.modules.Util.download(\"https://raw.githubusercontent.com/lefou/millw/main/millw\")\n  val millw = build.millSourcePath / \"millw\"\n  os.copy.over(target.path, millw)\n  os.perms.set(millw, os.perms(millw) + java.nio.file.attribute.PosixFilePermission.OWNER_EXECUTE)\n  target\n}\n----\n\n== GitHub release CDN support\n\nIn some areas, the network environment makes downloading files from GitHub release very time-consuming. Fortunately,\nsome CDN services can speed up GitHub release files. You can use the `GITHUB_RELEASE_CDN` environment variable to add\na CDN url prefix before the original GitHub release file url to speed up your file downloads!\n\n== License\n\nPublished under the https://www.apache.org/licenses/LICENSE-2.0[Apache Licencse, Version 2.0].\n\n== Changelog\n\n=== millw 0.4.12 - 2024-06-25\n\n* Introduce a new PowerShell wrapper script.\n\n=== millw 0.4.11 - 2023-12-18\n\n* Fixed BSP mode on Windows, due to incorrect `MILL_MAIN_CLI` variable handling.\n\n=== millw 0.4.10 - 2023-09-29\n\n* Fixed unlimited self-calls when the `millw` script is installed in a location that is also part of the `PATH` environment variable.\n\n=== millw 0.4.9 - 2023-09-27\n\n*This version has issues if you use it as system-wide installed mill replacement. Please don't use this version!*\n\n* Improved the logic to use a system-wide installed Mill executable\n\n=== millw 0.4.8 - 2023-07-25\n\n* Fixed typo in `millw.bat`\n* Update fallback Mill version to 0.11.1\n\n=== millw 0.4.7 - 2023-06-19\n\n* Download newer Mill versions (`0.11.0+`) from Maven Central\n* Added support for `GITHUB_RELEASE_CDN` variable, to speed up downloads\n\n=== millw 0.4.6 - 2023-01-06\n\n* Fixed a misplaced newline in `millw.bat`\n\n=== millw 0.4.5 - 2022-11-15\n\n* Fixed issues with running Mill in `--repl`, `--no-server` or `--bsp` mode by preserving the first position of those essential Mill options\n\n=== millw 0.4.4 - 2022-11-04\n\n* Feed the currently used mill executable to the Mill process (uses `mill.main.cli` system property) and support `MILL_MAIN_CLI` env variable to override the value\n\n=== millw 0.4.3 - 2022-09-07\n\n* Support reading the version from local `.config/mill-version` file\n* Read a `DEFAULT_MILL_VERSION` env variable before falling back to hardcoded default version\n\n=== millw 0.4.2 - 2022-02-15\n\n* Don't be verbose when system mill version can't detected\n\n=== millw 0.4.1 - 2022-02-15\n\n* Removed bash specifics from shell script\n* Cleaned up shell script\n* Use system-installed  mill version if possible\n* Added CI job to run some checks\n\n=== millw 0.4.0 - 2021-12-22\n\n* Use curl with --force options to make millw more robust against download errors\n\n=== millw 0.3.9 - 2021-11-17\n\n* Use 6 digits for mktemp\n* Fixed download URL for snapshot releases\n\n=== millw 0.3.8 - 2021-09-17\n\n* Added support for mill milestones (calculate correct download URL), fixes issues with mill 0.10.0-M2\n\n=== millw 0.3.7 - 2021-08-26\n\n* Write messages from the wrapper script to STDERR\n\n=== millw 0.3.6 - 2021-07-22\n\n* millw: Support non-GNU touch command, e.g. on BSD and OSX\n\n=== millw 0.3.5 - 2021-03-01\n\n* Updated mill repository URLs (mill repo has moved)\n* millw.bat: script exit does not exit the command shell\n* millw.bat: use curl if present, otherwise fall back to bitsadmin\n\n=== millw 0.3.4 - 2020-10-27\n\n* millw.bat: Fixed download URL to support snapshot versions of mill\n* millw: Support running/downloading when used with Git Bash under Windows 10\n\n=== millw 0.3.3 - 2020-07-14\n\n* millw: Fixed fetching of latest mill version\n\n=== millw 0.3.2 - 2020-05-09\n\n* millw.bat: Fixed handling and stripping of `--mill-version` parameter before calling mill\n\n=== millw 0.3.1 - 2020-04-10\n\n* millw.bat: Quote mill command to support directories with spaces\n\n=== millw 0.3.0 - 2019-12-06\n\n* Conform to XDG Base Directory Specification (use `~/.cache` dir)\n\n=== millw 0.2.0 - 2019-07-10\n\n* Print info message before download\n* millw: If no version was given, millw tries to download the latest version\n* Support changed download filename scheme since mill 0.5.0\n* Respect set version from MILL_VERSION environment variable, if defined\n\n=== millw 0.1.0 - 2019-03-27\n\n* First release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefou%2Fmillw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefou%2Fmillw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefou%2Fmillw/lists"}