update version to v0.1.2

This commit is contained in:
tickstep 2022-01-24 22:17:33 +08:00
parent d36a764525
commit 7f53b9642c
5 changed files with 18 additions and 18 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity version="0.1.1.0" processorArchitecture="*" name="com.tickstep.aliyunpan" type="win32"/> <assemblyIdentity version="0.1.2.0" processorArchitecture="*" name="com.tickstep.aliyunpan" type="win32"/>
<dependency> <dependency>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>

26
main.go
View File

@ -50,7 +50,7 @@ const (
var ( var (
// Version 版本号 // Version 版本号
Version = "v0.1.1" Version = "v0.1.2"
historyFilePath = filepath.Join(config.GetConfigDir(), "aliyunpan_command_history.txt") historyFilePath = filepath.Join(config.GetConfigDir(), "aliyunpan_command_history.txt")
@ -200,8 +200,8 @@ func main() {
} }
var ( var (
activeUser = config.Config.ActiveUser() activeUser = config.Config.ActiveUser()
runeFunc = unicode.IsSpace runeFunc = unicode.IsSpace
cmdRuneFunc = func(r rune) bool { cmdRuneFunc = func(r rune) bool {
switch r { switch r {
case '\'', '"': case '\'', '"':
@ -462,10 +462,10 @@ func main() {
// 显示命令历史 // 显示命令历史
{ {
Name: "history", Name: "history",
Aliases: []string{}, Aliases: []string{},
Usage: "显示命令历史", Usage: "显示命令历史",
UsageText: app.Name + " history", UsageText: app.Name + " history",
Description: `显示命令历史 Description: `显示命令历史
示例: 示例:
@ -478,11 +478,11 @@ func main() {
3. 显示全部命令历史 3. 显示全部命令历史
aliyunpan history -n 0 aliyunpan history -n 0
`, `,
Category: "其他", Category: "其他",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
lineCount := 20 lineCount := 20
if c.IsSet("n") { if c.IsSet("n") {
lineCount = c.Int("n") lineCount = c.Int("n")
} }
printTable := func(lines []string) { printTable := func(lines []string) {
tb := cmdtable.NewTable(os.Stdout) tb := cmdtable.NewTable(os.Stdout)
@ -490,7 +490,7 @@ func main() {
tb.SetHeaderAlignment(tablewriter.ALIGN_LEFT) tb.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
tb.SetColumnAlignment([]int{tablewriter.ALIGN_LEFT, tablewriter.ALIGN_LEFT}) tb.SetColumnAlignment([]int{tablewriter.ALIGN_LEFT, tablewriter.ALIGN_LEFT})
idx := 1 idx := 1
for _,line := range lines { for _, line := range lines {
if line == "" { if line == "" {
continue continue
} }
@ -499,13 +499,13 @@ func main() {
} }
tb.Render() tb.Render()
} }
if contents,err := ioutil.ReadFile(historyFilePath);err == nil { if contents, err := ioutil.ReadFile(historyFilePath); err == nil {
result := strings.Split(string(contents), "\n") result := strings.Split(string(contents), "\n")
if lineCount == 0 { if lineCount == 0 {
printTable(result) printTable(result)
} else { } else {
outputLine := make([]string, 0) outputLine := make([]string, 0)
for idx := len(result)-1; idx >= 0; idx-- { for idx := len(result) - 1; idx >= 0; idx-- {
line := result[idx] line := result[idx]
if line != "" { if line != "" {
outputLine = append(outputLine, line) outputLine = append(outputLine, line)
@ -515,7 +515,7 @@ func main() {
} }
} }
lines := make([]string, 0) lines := make([]string, 0)
for idx := len(outputLine)-1; idx >= 0; idx-- { for idx := len(outputLine) - 1; idx >= 0; idx-- {
lines = append(lines, outputLine[idx]) lines = append(lines, outputLine[idx])
} }
printTable(lines) printTable(lines)

Binary file not shown.

Binary file not shown.

View File

@ -3,13 +3,13 @@
"FileVersion": { "FileVersion": {
"Major": 0, "Major": 0,
"Minor": 1, "Minor": 1,
"Patch": 1, "Patch": 2,
"Build": 0 "Build": 0
}, },
"ProductVersion": { "ProductVersion": {
"Major": 0, "Major": 0,
"Minor": 1, "Minor": 1,
"Patch": 1, "Patch": 2,
"Build": 0 "Build": 0
}, },
"FileFlagsMask": "3f", "FileFlagsMask": "3f",
@ -22,14 +22,14 @@
"Comments": "", "Comments": "",
"CompanyName": "tickstep", "CompanyName": "tickstep",
"FileDescription": "阿里云盘客户端", "FileDescription": "阿里云盘客户端",
"FileVersion": "v0.1.1", "FileVersion": "v0.1.2",
"InternalName": "", "InternalName": "",
"LegalCopyright": "© 2021 tickstep.", "LegalCopyright": "© 2021 tickstep.",
"LegalTrademarks": "", "LegalTrademarks": "",
"OriginalFilename": "", "OriginalFilename": "",
"PrivateBuild": "", "PrivateBuild": "",
"ProductName": "aliyunpan", "ProductName": "aliyunpan",
"ProductVersion": "v0.1.1", "ProductVersion": "v0.1.2",
"SpecialBuild": "" "SpecialBuild": ""
}, },
"VarFileInfo": { "VarFileInfo": {