mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-31 07:07:09 +09:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a3e2b3ff0 | ||
|
|
1260dcc5ee | ||
|
|
2de42bcf99 | ||
|
|
e0074c881c | ||
|
|
1a5e90c8a2 | ||
|
|
ff31da0d6d |
5
Makefile
5
Makefile
@@ -1,9 +1,10 @@
|
||||
.PHONY: runtime
|
||||
|
||||
VERSION = "$(shell git rev-parse --short HEAD)"
|
||||
VERSION = $(shell git describe --tags --abbrev=0)
|
||||
HASH = $(shell git rev-parse --short HEAD)
|
||||
|
||||
build: tcell
|
||||
go build -ldflags "-X main.Version=$(VERSION)" -o micro ./cmd/micro
|
||||
go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(shell date -u '+%B %d, %Y')'" -o micro ./cmd/micro
|
||||
|
||||
install: build
|
||||
mv micro $(GOPATH)/bin
|
||||
|
||||
11
README.md
11
README.md
@@ -25,6 +25,7 @@ Here is a picture of micro editing its source code.
|
||||
* Extremely good mouse support
|
||||
* This means mouse dragging to create a selection, double click to select by word, and triple click to select by line
|
||||
* Cross platform (It should work on all the platforms Go runs on)
|
||||
* Note that while Windows is supported, there are still some bugs that need to be worked out
|
||||
* Plugin system (plugins are written in Lua)
|
||||
* Automatic linting and error notifications
|
||||
* Syntax highlighting (for over [75 languages](runtime/syntax)!)
|
||||
@@ -51,15 +52,17 @@ Plan9, NaCl, and Cygwin (although this may change in the future).
|
||||
|
||||
All you need to install micro is one file, the binary itself. It's as simple as that!
|
||||
|
||||
You can download the correct binary for your operating system from the list in the [nightly build release](https://github.com/zyedidia/micro/releases/tag/nightly).
|
||||
You can download the correct binary for your operating system from the list in the [nightly build release](https://github.com/zyedidia/micro/releases).
|
||||
|
||||
Micro has no released version, instead these binaries are compiled every night and you can find the
|
||||
commit they were compiled with by running `micro -version`.
|
||||
On that page you'll see the nightly release, which contains binaries for micro which are built every night,
|
||||
and you'll see all the stable releases with the corresponding binaries.
|
||||
|
||||
If your operating system does not have binary, but does run Go, you can build from source.
|
||||
If you'd like to see more information after installing micro, run `micro -version`.
|
||||
|
||||
### Building from source
|
||||
|
||||
If your operating system does not have binary, but does run Go, you can build from source.
|
||||
|
||||
Make sure that you have Go version 1.5 or greater (Go 1.4 will work for the systems like support CGO then).
|
||||
|
||||
```sh
|
||||
|
||||
@@ -15,7 +15,7 @@ type Colorscheme map[string]tcell.Style
|
||||
// The current colorscheme
|
||||
var colorscheme Colorscheme
|
||||
|
||||
var preInstalledColors = []string{"default", "solarized", "solarized-tc", "atom-dark-tc", "monokai", "gruvbox"}
|
||||
var preInstalledColors = []string{"default", "solarized", "solarized-tc", "atom-dark-tc", "monokai", "gruvbox", "zenburn"}
|
||||
|
||||
// InitColorscheme picks and initializes the colorscheme when micro starts
|
||||
func InitColorscheme() {
|
||||
|
||||
@@ -43,7 +43,9 @@ var (
|
||||
|
||||
// Version is the version number or commit hash
|
||||
// This should be set by the linker when compiling
|
||||
Version = "Unknown"
|
||||
Version = "Unknown"
|
||||
CommitHash = "Unknown"
|
||||
CompileDate = "Unknown"
|
||||
|
||||
// L is the lua state
|
||||
// This is the VM that runs the plugins
|
||||
@@ -194,7 +196,9 @@ func main() {
|
||||
flag.Parse()
|
||||
if *flagVersion {
|
||||
// If -version was passed
|
||||
fmt.Println("Micro version:", Version)
|
||||
fmt.Println("Version:", Version)
|
||||
fmt.Println("Commit hash:", CommitHash)
|
||||
fmt.Println("Compiled on", CompileDate)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -150,12 +150,12 @@ func GetOption(name string) interface{} {
|
||||
return GetGlobalOption(name)
|
||||
}
|
||||
|
||||
// DefaultSettings returns the default settings for micro
|
||||
// DefaultGlobalSettings returns the default global settings for micro
|
||||
// Note that colorscheme is a global only option
|
||||
func DefaultGlobalSettings() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"autoindent": true,
|
||||
"colorscheme": "monokai",
|
||||
"colorscheme": "zenburn",
|
||||
"cursorline": false,
|
||||
"ignorecase": false,
|
||||
"indentchar": " ",
|
||||
|
||||
20
runtime/colorschemes/zenburn.micro
Normal file
20
runtime/colorschemes/zenburn.micro
Normal file
@@ -0,0 +1,20 @@
|
||||
color-link default "188,237"
|
||||
color-link comment "108,237"
|
||||
color-link constant.string "174,237"
|
||||
color-link constant.number "116,237"
|
||||
color-link constant "181,237"
|
||||
color-link identifier "223,237"
|
||||
color-link statement "223,237"
|
||||
color-link preproc "223,237"
|
||||
color-link type "187,237"
|
||||
color-link special "181,237"
|
||||
color-link underlined "188,237"
|
||||
color-link error "115,236"
|
||||
color-link todo "bold 254,237"
|
||||
color-link statusline "186,236"
|
||||
color-link indent-char "238,237"
|
||||
color-link line-number "188,238"
|
||||
color-link gutter-error "237,174"
|
||||
color-link gutter-warning "174,237"
|
||||
color-link cursor-line "238"
|
||||
color-link current-line-number "188,237"
|
||||
@@ -21,6 +21,7 @@ color statement "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
|
||||
#Parenthetical Color
|
||||
# color magenta "[(){}]" "\[" "\]"
|
||||
|
||||
color constant.number "\b[0-9]+\b"
|
||||
|
||||
##
|
||||
## String highlighting. You will in general want your brightblacks and
|
||||
|
||||
@@ -13,27 +13,27 @@ color statement "\.\.(\.)?|!|\*|&|~|\(|\)|\[|\]|\\|/|\+|-|%|<|>|\?|:|;"
|
||||
color error "(0[0-7_]*)(L[uU]?|[uU]L?)?"
|
||||
|
||||
## Decimal integer literals
|
||||
color constant "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?"
|
||||
color constant.number "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?"
|
||||
|
||||
## Binary integer literals
|
||||
color constant "(0[bB][01_]*)(L[uU]?|[uU]L?)?"
|
||||
|
||||
## Decimal float literals
|
||||
color constant "[0-9][0-9_]*\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
||||
color constant "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
|
||||
color constant "[^.]\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
||||
color constant "[0-9][0-9_]*([fFL]?i|[fF])"
|
||||
color constant.number "[0-9][0-9_]*\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
||||
color constant.number "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
|
||||
color constant.number "[^.]\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
||||
color constant.number "[0-9][0-9_]*([fFL]?i|[fF])"
|
||||
|
||||
## Hexadecimal integer literals
|
||||
color constant "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
|
||||
color constant.number "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
|
||||
|
||||
## Hexadecimal float literals
|
||||
color constant "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
||||
color constant "0[xX]\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
||||
color constant.number "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
||||
color constant.number "0[xX]\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
||||
|
||||
|
||||
## Character literals
|
||||
color constant "'([^\']|\\(['"?\abfnrtv]|x[[:xdigit:]]{2}|[0-7]{1,3}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8}|&.*;))'"
|
||||
color constant.string "'([^\']|\\(['"?\abfnrtv]|x[[:xdigit:]]{2}|[0-7]{1,3}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8}|&.*;))'"
|
||||
|
||||
## Keywords
|
||||
## a-e
|
||||
|
||||
@@ -6,6 +6,7 @@ color statement "\b(break|case|catch|continue|default|do|else|finally|for|if|ret
|
||||
color type "\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\b"
|
||||
color constant.string ""[^"]*""
|
||||
color constant "\b(true|false|null)\b"
|
||||
color constant.number "\b[0-9]+\b"
|
||||
color comment "//.*"
|
||||
color comment start="/\*" end="\*/"
|
||||
color comment start="/\*\*" end="\*/"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
syntax "javascript" "\.js$"
|
||||
|
||||
color blue "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
|
||||
color blue "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||
color blue "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
||||
color constant.number "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
|
||||
color constant.number "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||
color constant.number "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||
color identifier "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
||||
color statement "\b(break|case|catch|continue|default|delete|do|else|finally)\b"
|
||||
color statement "\b(for|function|get|if|in|instanceof|new|return|set|switch)\b"
|
||||
color statement "\b(switch|this|throw|try|typeof|var|void|while|with)\b"
|
||||
|
||||
@@ -46,7 +46,7 @@ color constant "\b(false|nil|true)\b"
|
||||
color statement "(\b(dofile|require|include)|%q|%!|%Q|%r|%x)\b"
|
||||
|
||||
# Numbers
|
||||
color constant "\b([0-9]+)\b"
|
||||
color constant.number "\b([0-9]+)\b"
|
||||
|
||||
# Symbols
|
||||
color statement "(\(|\)|\[|\]|\{|\})"
|
||||
|
||||
@@ -30,7 +30,7 @@ color statement "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
|
||||
color statement "[(){}]" "\[" "\]"
|
||||
|
||||
## numbers
|
||||
color constant "\b[0-9]+\b"
|
||||
color constant.number "\b[0-9]+\b"
|
||||
|
||||
## strings
|
||||
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
||||
|
||||
@@ -7,6 +7,7 @@ header "^#!.*/(env +)?ruby( |$)"
|
||||
color statement "\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b"
|
||||
## Constants
|
||||
color constant "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
|
||||
color constant.number "\b[0-9]+\b"
|
||||
## Ruby "symbols"
|
||||
color constant (i) "([ ]|^):[0-9A-Z_]+\b"
|
||||
## Some unique things we want to stand out
|
||||
@@ -15,14 +16,14 @@ color constant "\b(__FILE__|__LINE__)\b"
|
||||
color constant "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
|
||||
## Shell command expansion is in `backticks` or like %x{this}. These are
|
||||
## "double-quotish" (to use a perlism).
|
||||
color constant "`[^`]*`" "%x\{[^}]*\}"
|
||||
color constant.string "`[^`]*`" "%x\{[^}]*\}"
|
||||
## Strings, double-quoted
|
||||
color constant ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
|
||||
color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
|
||||
## Expression substitution. These go inside double-quoted strings,
|
||||
## "like #{this}".
|
||||
color special "#\{[^}]*\}"
|
||||
## Strings, single-quoted
|
||||
color constant "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
|
||||
color constant.string "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
|
||||
## Comments
|
||||
color comment "#[^{].*$" "#$"
|
||||
color comment "##[^{].*$" "##$"
|
||||
|
||||
@@ -16,6 +16,9 @@ color special "[a-z_]+!"
|
||||
# Constants
|
||||
color constant "[A-Z][A-Z_]+"
|
||||
|
||||
# Numbers
|
||||
color constant.number "\b[0-9]+\b"
|
||||
|
||||
# Traits/Enums/Structs/Types/etc.
|
||||
color type "[A-Z][a-z]+"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ syntax "shell" "\.sh$" "\.bash" "\.bashrc" "bashrc" "\.bash_aliases" "bash_alias
|
||||
header "^#!.*/(env +)?(ba)?sh( |$)"
|
||||
|
||||
# Numbers
|
||||
color constant "\b[0-9]+\b"
|
||||
color constant.number "\b[0-9]+\b"
|
||||
|
||||
# Conditionals and control flow
|
||||
color statement "\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\b"
|
||||
|
||||
@@ -16,7 +16,7 @@ color statement "(print)"
|
||||
color statement "(init)"
|
||||
|
||||
# Numbers
|
||||
color constant "([0-9]+)"
|
||||
color constant.number "([0-9]+)"
|
||||
|
||||
# Standard Types
|
||||
color type "\ ((U)?Int(8|16|32|64))"
|
||||
|
||||
@@ -5,4 +5,5 @@ color statement "\b([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?un
|
||||
color statement "\b(snor|nun|nm|set|if|endif|let|unlet)\b"
|
||||
color statement "[!&=]"
|
||||
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
||||
color constant.number "\b[0-9]+\b"
|
||||
color comment "(^|[[:space:]])\"[^"]*$"
|
||||
|
||||
@@ -6,55 +6,55 @@ mkdir -p micro-$1
|
||||
cp LICENSE micro-$1
|
||||
cp README.md micro-$1
|
||||
|
||||
VERSION="$(git rev-parse --short HEAD)"
|
||||
HASH="$(git rev-parse --short HEAD)"
|
||||
|
||||
# Mac
|
||||
echo "OSX 64"
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-osx.tar.gz micro-$1
|
||||
mv micro-$1-osx.tar.gz binaries
|
||||
|
||||
# Linux
|
||||
echo "Linux 64"
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-linux64.tar.gz micro-$1
|
||||
mv micro-$1-linux64.tar.gz binaries
|
||||
echo "Linux 32"
|
||||
GOOS=linux GOARCH=386 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=linux GOARCH=386 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-linux32.tar.gz micro-$1
|
||||
mv micro-$1-linux32.tar.gz binaries
|
||||
echo "Linux arm"
|
||||
GOOS=linux GOARCH=arm go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=linux GOARCH=arm go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-linux-arm.tar.gz micro-$1
|
||||
mv micro-$1-linux-arm.tar.gz binaries
|
||||
|
||||
# NetBSD
|
||||
echo "NetBSD 64"
|
||||
GOOS=netbsd GOARCH=amd64 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=netbsd GOARCH=amd64 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-netbsd64.tar.gz micro-$1
|
||||
mv micro-$1-netbsd64.tar.gz binaries
|
||||
echo "NetBSD 32"
|
||||
GOOS=netbsd GOARCH=386 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=netbsd GOARCH=386 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-netbsd32.tar.gz micro-$1
|
||||
mv micro-$1-netbsd32.tar.gz binaries
|
||||
|
||||
# OpenBSD
|
||||
echo "OpenBSD 64"
|
||||
GOOS=openbsd GOARCH=amd64 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=openbsd GOARCH=amd64 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-openbsd64.tar.gz micro-$1
|
||||
mv micro-$1-openbsd64.tar.gz binaries
|
||||
echo "OpenBSD 32"
|
||||
GOOS=openbsd GOARCH=386 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=openbsd GOARCH=386 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-openbsd32.tar.gz micro-$1
|
||||
mv micro-$1-openbsd32.tar.gz binaries
|
||||
|
||||
# FreeBSD
|
||||
echo "FreeBSD 64"
|
||||
GOOS=freebsd GOARCH=amd64 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=freebsd GOARCH=amd64 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-freebsd64.tar.gz micro-$1
|
||||
mv micro-$1-freebsd64.tar.gz binaries
|
||||
echo "FreeBSD 32"
|
||||
GOOS=freebsd GOARCH=386 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro ./cmd/micro
|
||||
GOOS=freebsd GOARCH=386 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro ./cmd/micro
|
||||
tar -czf micro-$1-freebsd32.tar.gz micro-$1
|
||||
mv micro-$1-freebsd32.tar.gz binaries
|
||||
|
||||
@@ -62,11 +62,11 @@ rm micro-$1/micro
|
||||
|
||||
# Windows
|
||||
echo "Windows 64"
|
||||
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro.exe ./cmd/micro
|
||||
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro.exe ./cmd/micro
|
||||
zip -r -q -T micro-$1-win64.zip micro-$1
|
||||
mv micro-$1-win64.zip binaries
|
||||
echo "Windows 32"
|
||||
GOOS=windows GOARCH=386 go build -ldflags "-X main.Version=$VERSION" -o micro-$1/micro.exe ./cmd/micro
|
||||
GOOS=windows GOARCH=386 go build -ldflags "-X main.Version=$1 -X main.CommitHash=$HASH -X 'main.CompileDate=$(date -u '+%B %d, %Y')'" -o micro-$1/micro.exe ./cmd/micro
|
||||
zip -r -q -T micro-$1-win32.zip micro-$1
|
||||
mv micro-$1-win32.zip binaries
|
||||
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
# $1 is the title, $2 is the description
|
||||
|
||||
commitID=$(git rev-parse HEAD)
|
||||
tag="v$1"
|
||||
|
||||
echo "Creating tag"
|
||||
git tag $1 $commitID
|
||||
git tag $tag $commitID
|
||||
git push --tags
|
||||
|
||||
echo "Creating new release"
|
||||
github-release release \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "$1" \
|
||||
--description "$2" \
|
||||
--pre-release
|
||||
@@ -23,7 +24,7 @@ echo "Uploading OSX binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-osx.tar.gz" \
|
||||
--file binaries/micro-$1-osx.tar.gz
|
||||
|
||||
@@ -31,7 +32,7 @@ echo "Uploading Linux 64 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-linux64.tar.gz" \
|
||||
--file binaries/micro-$1-linux64.tar.gz
|
||||
|
||||
@@ -39,7 +40,7 @@ echo "Uploading Linux 32 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-linux32.tar.gz" \
|
||||
--file binaries/micro-$1-linux32.tar.gz
|
||||
|
||||
@@ -47,7 +48,7 @@ echo "Uploading Linux Arm binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-linux-arm.tar.gz" \
|
||||
--file binaries/micro-$1-linux-arm.tar.gz
|
||||
|
||||
@@ -55,7 +56,7 @@ echo "Uploading FreeBSD 64 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-freebsd64.tar.gz" \
|
||||
--file binaries/micro-$1-freebsd64.tar.gz
|
||||
|
||||
@@ -63,7 +64,7 @@ echo "Uploading FreeBSD 32 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-freebsd32.tar.gz" \
|
||||
--file binaries/micro-$1-freebsd32.tar.gz
|
||||
|
||||
@@ -71,7 +72,7 @@ echo "Uploading OpenBSD 64 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-openbsd64.tar.gz" \
|
||||
--file binaries/micro-$1-openbsd64.tar.gz
|
||||
|
||||
@@ -79,7 +80,7 @@ echo "Uploading OpenBSD 32 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-openbsd32.tar.gz" \
|
||||
--file binaries/micro-$1-openbsd32.tar.gz
|
||||
|
||||
@@ -87,7 +88,7 @@ echo "Uploading NetBSD 64 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-netbsd64.tar.gz" \
|
||||
--file binaries/micro-$1-netbsd64.tar.gz
|
||||
|
||||
@@ -95,7 +96,7 @@ echo "Uploading NetBSD 32 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-netbsd32.tar.gz" \
|
||||
--file binaries/micro-$1-netbsd32.tar.gz
|
||||
|
||||
@@ -103,7 +104,7 @@ echo "Uploading Windows 64 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-win64.zip" \
|
||||
--file binaries/micro-$1-win64.zip
|
||||
|
||||
@@ -111,6 +112,6 @@ echo "Uploading Windows 32 binary"
|
||||
github-release upload \
|
||||
--user zyedidia \
|
||||
--repo micro \
|
||||
--tag $1 \
|
||||
--tag $tag \
|
||||
--name "micro-$1-win32.zip" \
|
||||
--file binaries/micro-$1-win32.zip
|
||||
|
||||
Reference in New Issue
Block a user