From e1e9f706cd2ab1e89f8c35a5fe3cb47969ed9f68 Mon Sep 17 00:00:00 2001 From: John Gee Date: Sat, 11 Apr 2020 17:46:36 +1200 Subject: [PATCH] Change filename. Prepare for release. --- CHANGELOG.md | 13 +++++++++---- README.md | 2 +- bin/n | 6 +++--- test/tests/version-resolve.bats | 16 ++++++++-------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7ba117..4bf0213 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. -## [Unreleased] (date goes here) - -## [6.5.0] (2020-04-11) +## [6.5.1] (2020-04-11) ### Added -- specify `auto` to read the target version from a ` .node-version` file ([#616]) +- specify `auto` to read the target version from a `.n-node-version` file (i.e. change filename) + +## [6.5.0] (2020-04-11) [YANKED] + +### Added + +- specify `auto` to read the target version from a `.node-version` file ([#616]) ## [6.4.0] (2020-03-10) @@ -277,6 +281,7 @@ Only minor functional changes, but technically could break scripts relying on sp [Unreleased]: https://github.com/tj/n/compare/master...develop +[6.5.1]: https://github.com/tj/n/compare/v6.5.0...v6.5.1 [6.5.0]: https://github.com/tj/n/compare/v6.4.0...v6.5.0 [6.4.0]: https://github.com/tj/n/compare/v6.3.1...v6.4.0 [6.3.1]: https://github.com/tj/n/compare/v6.3.0...v6.3.1 diff --git a/README.md b/README.md index 8d1ac2e..a6538b5 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ There are labels for two especially useful versions: There is a label to read the target version from a file, on the first line: -- `auto`: read version from `.node-version` file +- `auto`: read version from `.n-node-version` file There is support for release streams: diff --git a/bin/n b/bin/n index f0ebd39..a92cff0 100755 --- a/bin/n +++ b/bin/n @@ -40,7 +40,7 @@ function echo_red() { # Setup and state # -VERSION="6.5.1-0" +VERSION="6.5.1" N_PREFIX="${N_PREFIX-/usr/local}" N_PREFIX=${N_PREFIX%/} @@ -334,7 +334,7 @@ Versions: 4.9.1, 8, v6.1 Numeric versions lts Newest Long Term Support official release latest, current Newest official release - auto Read version from .node-version + auto Read version from .n-node-version boron, carbon Codenames for release streams and nightly, chakracore-release/latest, rc/10 et al @@ -896,7 +896,7 @@ function tarball_url() { # function display_auto_version() { - local filename=".node-version" + local filename=".n-node-version" [[ -e "${filename}" ]] || abort "auto version file not found (${filename})" # read returns a non-zero status but does still work if there is no line ending <"${filename}" read -r version diff --git a/test/tests/version-resolve.bats b/test/tests/version-resolve.bats index 89e3223..626e6ec 100644 --- a/test/tests/version-resolve.bats +++ b/test/tests/version-resolve.bats @@ -14,14 +14,14 @@ function setup() { @test "auto, missing file" { cd "${MY_DIR}" - rm -f .node-version + rm -f .n-node-version run n N_MOCK_DISPLAY_LATEST_RESOLVED_VERSION auto [ "$status" -ne 0 ] } @test "auto, no eol" { cd "${MY_DIR}" - printf "101.0.1" > .node-version + printf "101.0.1" > .n-node-version run n N_MOCK_DISPLAY_LATEST_RESOLVED_VERSION auto [ "$status" -eq 0 ] [ "$output" = "101.0.1" ] @@ -29,7 +29,7 @@ function setup() { @test "auto, unix eol" { cd "${MY_DIR}" - printf "101.0.2\n" > .node-version + printf "101.0.2\n" > .n-node-version run n N_MOCK_DISPLAY_LATEST_RESOLVED_VERSION auto [ "$status" -eq 0 ] [ "$output" = "101.0.2" ] @@ -37,7 +37,7 @@ function setup() { @test "auto, Windows eol" { cd "${MY_DIR}" - printf "101.0.3\r\n" > .node-version + printf "101.0.3\r\n" > .n-node-version run n N_MOCK_DISPLAY_LATEST_RESOLVED_VERSION auto [ "$status" -eq 0 ] [ "$output" = "101.0.3" ] @@ -45,7 +45,7 @@ function setup() { @test "auto, leading v" { cd "${MY_DIR}" - printf "v101.0.4\n" > .node-version + printf "v101.0.4\n" > .n-node-version run n N_MOCK_DISPLAY_LATEST_RESOLVED_VERSION auto [ "$status" -eq 0 ] [ "$output" = "101.0.4" ] @@ -53,16 +53,16 @@ function setup() { @test "auto, first line only" { cd "${MY_DIR}" - printf "101.0.5\nmore text\n" > .node-version + printf "101.0.5\nmore text\n" > .n-node-version run n N_MOCK_DISPLAY_LATEST_RESOLVED_VERSION auto [ "$status" -eq 0 ] [ "$output" = "101.0.5" ] } @test "auto, lookup" { - # Check normal resolving, which is allowed but not required for MVP .node-version + # Check normal resolving, which is allowed but not required for MVP cd "${MY_DIR}" - printf "4.9\n" > .node-version + printf "4.9\n" > .n-node-version run n N_MOCK_DISPLAY_LATEST_RESOLVED_VERSION auto [ "$status" -eq 0 ] [ "$output" = "4.9.1" ]