Skip to content

Commit

Permalink
Merge support .config directory for mill-version (#36)
Browse files Browse the repository at this point in the history
Pull request: #36
  • Loading branch information
lefou authored Sep 7, 2022
2 parents 5599833 + 739bd41 commit 4708566
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ sh $ mill --disable-ticker version
{mill-version}
----

* else if there is a file `.config/mill-version`, it's content will be used as mill version.

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

* The values of the `DEFAULT_MILL_VERSION` variable inside the script will be used.
Expand Down
2 changes: 2 additions & 0 deletions millw
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ fi
if [ -z "${MILL_VERSION}" ] ; then
if [ -f ".mill-version" ] ; then
MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
elif [ -f ".config/mill-version" ] ; then
MILL_VERSION="$(head -n 1 .config/mill-version 2> /dev/null)"
fi
fi

Expand Down
5 changes: 5 additions & 0 deletions millw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ if [!MILL_VERSION!]==[] (
if exist .mill-version (
set /p MILL_VERSION=<.mill-version
)
else (
if exist .config\mill-version (
set /p MILL_VERSION=<.config\mill-version
)
)
)

if [!MILL_VERSION!]==[] (
Expand Down

0 comments on commit 4708566

Please sign in to comment.