0
0
mirror of https://github.com/tj/n.git synced 2024-11-21 18:48:57 +01:00

Change filename. Prepare for release.

This commit is contained in:
John Gee 2020-04-11 17:46:36 +12:00
parent 16b386ebb5
commit e1e9f706cd
4 changed files with 21 additions and 16 deletions

View File

@ -7,13 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
<!-- markdownlint-disable MD024 -->
## [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
<!-- reference links for releases -->
[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

View File

@ -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:

6
bin/n
View File

@ -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

View File

@ -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" ]