Commit Graph

75 Commits

Author SHA1 Message Date
Zachary Yedidia
490ee93796 Fix info-plist script 2022-07-21 17:46:23 -07:00
Zachary Yedidia
0ac7193c4d Fix cross compilation from macOS 2022-07-15 11:40:32 -07:00
Zachary Yedidia
7df91eb038 Fix makefile for cross compilation 2021-10-29 04:47:23 +00:00
Zachary Yedidia
a6796fcbd9 Update makefile generation rules
Ref #2229
2021-09-29 16:30:20 -07:00
Dmitry Maluka
a21a720941
Make 'make' do the same as 'make build' (#2217)
Fix a slight regression after ec3292: when 'make' is run without specifying
a target, it counter-intuitively runs fetch-tags instead of building micro.
2021-09-24 14:40:26 -07:00
Ali Kefia
ec3292e8c4
Build : using go:generate and go:embed (#2195)
* using go:generate and go:embed

* fix import
2021-08-24 22:02:29 -04:00
Morten Linderud
9a3fb52b42
Support reproducible builds (#1802)
* Makefile: Ensure we strip out embedded paths

To reproduce binaries undeterministic values needs to be removed. By
default Go embeds several module paths into the binaries, which prevents
people from reproducing said distributed binary.

The distributed binary from micro contains the full home path of the
current builder of the binary. -trimpath removes these paths from the
binary.

    $ strings micro | grep "/home/zyedidia" | wc -l
    868

This also helps other distributions providing reproducible versions of
micro down the line.

Signed-off-by: Morten Linderud <morten@linderud.pw>

* build-date: Ensure build time adheres to SOURCE_DATE_EPOCH

Embedding undeterministic values into binaries prevents reproduction of
the binaries. The reproducible builds projects defines
`SOURCE_DATE_EPOCH` to allow deterministic insertion of build times.

This patch ensures `build-date` checks the environment variable before
building with the local time.

    $ SOURCE_DATE_EPOCH=123123 go run tools/build-date.go
    January 02, 1970
    $ go run tools/build-date.go
    July 31, 2020

    $ make build-quick && ./micro --version
    [...]
    Compiled on July 31, 2020
    $ SOURCE_DATE_EPOCH=123123 make build-quick && ./micro --version
    [...]
    Compiled on January 02, 1970

https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Morten Linderud <morten@linderud.pw>
2020-08-01 20:26:39 -04:00
Zachary Yedidia
be4d186a46 Close file properly in clean and update makefile 2020-06-27 17:55:01 -04:00
Zachary Yedidia
d0b75bc09f Add simulation screen tests 2020-06-20 18:24:12 -04:00
Zachary Yedidia
ca976a8a3c Update runtime build script
Ref #1687
2020-06-12 20:54:37 -04:00
Philipp Emanuel Weidmann
5ce26cca71
Make determining whether a code point represents a combining mark faster (#1719) 2020-06-12 00:10:00 -04:00
Zachary Yedidia
a491dd1c52 Merge branch 'buffer-benchmarks' of https://github.com/p-e-w/micro into p-e-w-buffer-benchmarks 2020-05-20 15:28:36 -04:00
Zachary Yedidia
c490a94700 Update makefile 2020-05-04 10:34:16 -04:00
Philipp Emanuel Weidmann
d038d3040f
Add more sophisticated buffer benchmark system 2020-03-01 13:20:10 +05:30
Zachary Yedidia
f059541e0d Merge branch 'buffer-tests' of https://github.com/p-e-w/micro into buffer-unit-tests 2020-02-25 10:30:31 -05:00
Zachary Yedidia
d8584d1ddb Debug off using default "go build"
Ref #1469
2020-02-24 12:55:59 -05:00
Philipp Emanuel Weidmann
f0cdc3cabb
Add buffer test and benchmark suite (and tool to generate it) 2020-02-22 08:51:38 +05:30
Zachary Yedidia
4874823240 Fix makefile tags dependencies 2020-02-13 20:00:35 -05:00
Zachary Yedidia
6a0e4b5564 Fetch tags before snapcraft build 2020-02-13 19:57:31 -05:00
Zachary Yedidia
e98be1a1e5 Update deps 2020-01-01 20:44:45 -05:00
Zachary Yedidia
a61616d79e More efficient loading for default syntax files
This change introduces header files for syntax files. The header
files only contain the filetype and detection info and can be
parsed much faster than parsing a full yaml file. To determine
which filetype a file is, only scanning the headers is necessary
and afterwards only one yaml file needs to be parsed. Use the
make_headers.go file to generate the header files. Micro expects
that all default syntax files will have header files and that
custom user syntax files may or may not have them. Resolving
includes within syntax has not yet been implemented. This
optimization improves startup time.

Ref #1427
2019-12-28 21:26:22 -05:00
Zachary Yedidia
8663014bbe Add support for syntax headers and update tcell 2019-12-28 18:53:51 -05:00
Zachary Yedidia
96322a6df9 Update makefile and vendor script 2019-12-26 22:03:30 -05:00
Zachary Yedidia
9e60d468ca Use osusergo build tag 2019-12-26 20:32:33 -05:00
Zachary Yedidia
5ab6c9795f Load plugins 2019-12-25 17:05:10 -05:00
Zachary Yedidia
4497daaef1 Resolve versions in plugin manager 2019-12-25 17:05:10 -05:00
Zachary Yedidia
739dd28652 Fix test dependencies and travis build 2019-12-25 17:05:10 -05:00
Zachary Yedidia
39446df749 update makefile 2019-12-25 17:05:10 -05:00
Zachary Yedidia
7cd83b4361 Fix tooling dependencies 2019-12-25 17:05:10 -05:00
Zachary Yedidia
0612af1590 Change project layout and use go.mod 2019-12-25 17:05:10 -05:00
Zachary Yedidia
c3e2085e3c Cursor improvements 2019-12-25 17:05:10 -05:00
Zachary Yedidia
dc68183fc1 Start refactor 2019-12-25 17:05:10 -05:00
Zachary Yedidia
7a013f666e Update runtime and auto-gofmt runtime in make 2018-07-02 12:22:32 -04:00
Zachary Yedidia
5dcc486214 Initialize submodules during makefile build 2017-07-21 17:53:26 -04:00
Zachary Yedidia
7ec222895c Update makefile 2017-06-18 09:54:07 -04:00
Zachary Yedidia
af1f161b06 Update makefile
Since dependencies are now vendored, there is no need to update them in
the makefile.
2017-06-17 17:54:08 -04:00
aerth
6945aa34eb
Use GOHOSTARCH/GOHOSTOS to get version, date, Resolves #620
For "install" target, get GOBIN using 'go env GOPATH'
instead of $GOPATH because new Go doesn't require $GOPATH be set
2017-04-12 10:42:39 -07:00
Samantha Marshall
7f95891a9a
Adding embedded Info.plist to OS X builds. 2016-12-28 13:17:54 -05:00
Zachary Yedidia
855c5283e4 Fix minor issue with makefile
Ref #448
2016-11-14 20:10:10 -05:00
Zachary Yedidia
cbc250b7d0 Improve Makefile
Now you can use 'make update' which will update micro and all the
dependencies (but won't rebuild). The makefile also now supports
having a $GOBIN variable and having multiple directories in your
$GOPATH.
2016-10-11 11:07:53 -04:00
Zachary Yedidia
6a5879cc15 Improve binary size by stripping more aggressively 2016-10-06 17:45:28 -04:00
boombuler
8ad2179423 Merge remote-tracking branch 'zyedidia/master' into pm 2016-10-01 07:20:21 +02:00
Zachary Yedidia
1c5c741e87 Make sure /Users/zachary/gocode/bin exists before putting binary there 2016-09-28 17:59:40 -04:00
Florian Sundermann
4bcb13efc0 try to set a more matching version number 2016-09-27 13:25:17 +02:00
anatoly techtonik
f247823936 Get build date on Windows without Python 2016-09-04 22:07:07 +03:00
anatoly techtonik
4b350d02e0 Let Go choose binary name and extension
This creates micro.exe on Windows
2016-09-04 19:38:50 +03:00
anatoly techtonik
ae3696e82d Use Python to get date in cross-platform way
I was able to build micro with Mozilla's pymake on Windows
2016-09-04 19:31:16 +03:00
Devon Carew
00eb6725e6 fix a typo 2016-09-03 09:16:08 -07:00
Zachary Yedidia
da7bc997ff Update docs and makefile 2016-08-27 22:00:56 -04:00
Zachary Yedidia
1260dcc5ee Add some more information to -version flag 2016-08-27 20:03:43 -04:00