Skip to content

Commit 8f561ce

Browse files
committed
ADD version
1 parent 726a012 commit 8f561ce

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ edit, ed Create or update profiles
1616
copy, cp Copy profiles
1717
remove, rm Remove a profile
1818
help, h Display this message
19+
version Display version
1920
```
2021

2122
## Configuration

cmd/npmrc/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ func main() {
6666
fallthrough
6767
case "h":
6868
Help()
69+
case "version":
70+
fmt.Println(Version)
6971
default:
7072
Help()
7173
os.Exit(1)
@@ -144,5 +146,6 @@ list, ls List available profiles
144146
edit, ed Create or update profiles
145147
copy, cp Copy profiles
146148
remove, rm Remove a profile
147-
help, h Display this message`)
149+
help, h Display this message
150+
version Display version`)
148151
}

cmd/npmrc/variables.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ package main
33
import homedir "github.com/mitchellh/go-homedir"
44

55
// NpmrcFile base name
6-
const NpmrcFile = ".npmrc"
6+
const (
7+
Version = "0.1.0"
8+
NpmrcFile = ".npmrc"
9+
)
710

811
var (
912
// Home user home directory

0 commit comments

Comments
 (0)