All Projects → lefou → millw

lefou / millw

Licence: Apache-2.0 license
Mill Wrapper Script

Programming Languages

shell
77523 projects
Batchfile
5799 projects
Makefile
30231 projects

Projects that are alternatives of or similar to millw

Mill
Your shiny new Java/Scala build tool!
Stars: ✭ 1,667 (+4067.5%)
Mutual labels:  build-tool, mill
Nsis
***This is just a mirror of https://sf.net/projects/nsis -- please report issues there*** NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.
Stars: ✭ 244 (+510%)
Mutual labels:  build-tool
Build Server Protocol
Protocol for IDEs and build tools to communicate about compile, run, test, debug and more.
Stars: ✭ 169 (+322.5%)
Mutual labels:  build-tool
Hxcpp
Runtime files for c++ backend for haxe
Stars: ✭ 228 (+470%)
Mutual labels:  build-tool
Zeus
An Electrifying Build System
Stars: ✭ 176 (+340%)
Mutual labels:  build-tool
Build Harness
🤖Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
Stars: ✭ 236 (+490%)
Mutual labels:  build-tool
Webpack Interview Questions
Webpack questions/answers you can use to prepare for interviews or test your knowledge.
Stars: ✭ 159 (+297.5%)
Mutual labels:  build-tool
buildozer
🚜 Build tool which simplify your buildprocess. Built with Gulp.js 🥤
Stars: ✭ 22 (-45%)
Mutual labels:  build-tool
Pax
The fastest JavaScript bundler in the galaxy.
Stars: ✭ 2,626 (+6465%)
Mutual labels:  build-tool
Seed
Build tool for Scala projects
Stars: ✭ 223 (+457.5%)
Mutual labels:  build-tool
Athena2
Build tool based on Webpack
Stars: ✭ 212 (+430%)
Mutual labels:  build-tool
Calvin
A minimalistic build tool for clojurescript projects that does not require the jvm
Stars: ✭ 181 (+352.5%)
Mutual labels:  build-tool
Dogo
Monitoring changes in the source file and automatically compile and run (restart).
Stars: ✭ 237 (+492.5%)
Mutual labels:  build-tool
Baumeister
👷 The aim of this project is to help you to build your things. From Bootstrap themes over static websites to single page applications.
Stars: ✭ 171 (+327.5%)
Mutual labels:  build-tool
Retire.js
scanner detecting the use of JavaScript libraries with known vulnerabilities
Stars: ✭ 2,909 (+7172.5%)
Mutual labels:  build-tool
Bach
🎼 Java Shell Builder - Build modular Java projects with JDK tools
Stars: ✭ 163 (+307.5%)
Mutual labels:  build-tool
Mbt
The most flexible build tool for monorepo
Stars: ✭ 184 (+360%)
Mutual labels:  build-tool
Scikit Build
Improved build system generator for CPython C, C++, Cython and Fortran extensions
Stars: ✭ 234 (+485%)
Mutual labels:  build-tool
proot-static-build
Build static variants of PRoot
Stars: ✭ 63 (+57.5%)
Mutual labels:  build-tool
Webpack
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Stars: ✭ 60,034 (+149985%)
Mutual labels:  build-tool

Mill Wrapper Script

How it works

millw is a small wrapper script around mill and works almost identical to mill. It automatically downloads the correct mill version (into ${XDG_CACHE_DIR}/mill/download or ~/.cache/mill/download).

I recommend to rename the tool to just mill. It is designed to be a drop-in replacement for the official mill binary. The project name and also the script name was primarily choosen to be millw to disambiguate references.

The mill version to be used will be determined by the following steps. The search ends, after the first step that results in a version.

  • If the first parameter is --mill-version, the second parameter will be used as the mill version.

    Example
    sh $ mill --mill-version 0.10.10 --disable-ticker version
    0.10.10
  • If the environment variable MILL_VERSION is defined, its value will be used.

    Example
    sh $ MILL_VERSION=0.10.10 mill --disable-ticker version
    0.10.10
  • If there is a file .mill-version in the working directory, its content will be used as mill version. The file must have only a mill version as content, no additional content or comments are supported.

    Example
    sh $ echo -n "0.10.10" > .mill-version
    sh $ mill --disable-ticker version
    0.10.10
  • If there is a file .config/mill-version, its content will be used as mill version.

  • The latest mill release available from the Github release pages will be used.

  • If the environment variable DEFAULT_MILL_VERSION is set, its value will be used.

  • The values of the DEFAULT_MILL_VERSION variable inside the script will be used.

Use cases

As mill executable

Istead of installing mill, you can just place the script into you local $HOME/bin directory and rename it to mill.

If you need a special mill version in a project directory, just place a .mill-version file with the best mill version.

Example: setting mill 0.10.10 as best local mill version
sh $ echo -n "0.10.10" > .mill-version

As a wrapper script in your project

To make the start for others easier or to always have the correct mill version in your CI environment[1], you can just place a copy of the script as millw (for Windows millw.bat) in your project root directory.

You should change the DEFAULT_MILL_VERSION variable in that script to the correct version you want to use and add the file under version control.

Add a target to update the millw script with mill

/**
 * Update the millw script.
 */
def millw() = T.command {
  val target = mill.modules.Util.download("https://raw.githubusercontent.com/lefou/millw/main/millw")
  val millw = build.millSourcePath / "millw"
  os.copy.over(target.path, millw)
  os.perms.set(millw, os.perms(millw) + java.nio.file.attribute.PosixFilePermission.OWNER_EXECUTE)
  target
}

GitHub release CDN support

In some areas, the network environment makes downloading files from GitHub release very time-consuming. Fortunately, some CDN services can speed up GitHub release files. You can use the GITHUB_RELEASE_CDN environment variable to add a CDN url prefix before the original GitHub release file url to speed up your file downloads!

License

Published under the Apache Licencse, Version 2.0.

Changelog

millw 0.4.6 - 2023-01-06

  • Fixed a misplaced newline in millw.bat

millw 0.4.5 - 2022-11-15

  • Fixed issues with running Mill in --repl, --no-server or --bsp mode by preserving the first position of those essential Mill options

millw 0.4.4 - 2022-11-04

  • 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

millw 0.4.3 - 2022-09-07

  • Support reading the version from local .config/mill-version file

  • Read a DEFAULT_MILL_VERSION env variable before falling back to hardcoded default version

millw 0.4.2 - 2022-02-15

  • Don’t be verbose when system mill version can’t detected

millw 0.4.1 - 2022-02-15

  • Removed bash specifics from shell script

  • Cleaned up shell script

  • Use system-installed mill version if possible

  • Added CI job to run some checks

millw 0.4.0 - 2021-12-22

  • Use curl with --force options to make millw more robust against download errors

millw 0.3.9 - 2021-11-17

  • Use 6 digits for mktemp

  • Fixed download URL for snapshot releases

millw 0.3.8 - 2021-09-17

  • Added support for mill milestones (calculate correct download URL), fixes issues with mill 0.10.0-M2

millw 0.3.7 - 2021-08-26

  • Write messages from the wrapper script to STDERR

millw 0.3.6 - 2021-07-22

  • millw: Support non-GNU touch command, e.g. on BSD and OSX

millw 0.3.5 - 2021-03-01

  • Updated mill repository URLs (mill repo has moved)

  • millw.bat: script exit does not exit the command shell

  • millw.bat: use curl if present, otherwise fall back to bitsadmin

millw 0.3.4 - 2020-10-27

  • millw.bat: Fixed download URL to support snapshot versions of mill

  • millw: Support running/downloading when used with Git Bash under Windows 10

millw 0.3.3 - 2020-07-14

  • millw: Fixed fetching of latest mill version

millw 0.3.2 - 2020-05-09

  • millw.bat: Fixed handling and stripping of --mill-version parameter before calling mill

millw 0.3.1 - 2020-04-10

  • millw.bat: Quote mill command to support directories with spaces

millw 0.3.0 - 2019-12-06

  • Conform to XDG Base Directory Specification (use ~/.cache dir)

millw 0.2.0 - 2019-07-10

  • Print info message before download

  • millw: If no version was given, millw tries to download the latest version

  • Support changed download filename scheme since mill 0.5.0

  • Respect set version from MILL_VERSION environment variable, if defined

millw 0.1.0 - 2019-03-27

  • First release


1. Continuous Integration environment
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].