From 0283155305528929e4799616cec0c2ed3bac0362 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Mon, 6 Jul 2020 03:13:02 +0000 Subject: [PATCH] Improve packaging Slight improvements to the man page, and the man page is now provided in prebuilt binary tarballs. Also a .deb file is now provided as an asset along with prebuilt binary tarballs. --- assets/packaging/micro.1 | 8 +++++--- tools/cross-compile.sh | 4 ++++ tools/nightly-release.sh | 1 + tools/package-deb.sh | 1 + tools/pre-release.sh | 1 + tools/release.sh | 1 + 6 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 tools/package-deb.sh diff --git a/assets/packaging/micro.1 b/assets/packaging/micro.1 index 811ba0d7..4581c12d 100644 --- a/assets/packaging/micro.1 +++ b/assets/packaging/micro.1 @@ -14,6 +14,8 @@ of modern terminals. It comes as one single, batteries-included, static binary w As the name indicates, micro aims to be somewhat of a successor to the nano editor by being easy to install and use in a pinch, but micro also aims to be enjoyable to use full time, whether you work in the terminal because you prefer it (like me), or because you need to (over ssh). +Use Ctrl-q to quit, Ctrl-s to save, and Ctrl-g to open the in-editor help menu. + .SH OPTIONS .PP \-clean @@ -51,7 +53,7 @@ Enable debug mode (enables logging to ./log.txt) Show the version number and information .RE -Micro's plugin's can be managed at the command line with the following commands. +Micro's plugins can be managed at the command line with the following commands. .RS 4 .PP @@ -119,5 +121,5 @@ and to report any newly encountered bugs you may find. We strive to correct bugs as swiftly as possible. .SH COPYRIGHT -Copyright \(co 2020 Zachary Yedidia, et al. -See /usr/share/doc/micro/LICENSE and /usr/share/doc/micro/AUTHORS for more information. +Copyright \(co 2020 Zachary Yedidia, et al. MIT license. +See \fBhttps://github.com/zyedidia/micro\fP for details. diff --git a/tools/cross-compile.sh b/tools/cross-compile.sh index 083a10ae..8c8b39d4 100755 --- a/tools/cross-compile.sh +++ b/tools/cross-compile.sh @@ -6,6 +6,7 @@ mkdir -p micro-$1 cp LICENSE micro-$1 cp README.md micro-$1 cp LICENSE-THIRD-PARTY micro-$1 +cp assets/packaging/micro.1 micro-$1 HASH="$(git rev-parse --short HEAD)" VERSION="$(go run tools/build-version.go)" @@ -22,6 +23,9 @@ mv micro-$1-osx.tar.gz binaries # Linux echo "Linux 64" GOOS=linux GOARCH=amd64 make build +./package-deb.sh $1 +mv micro_$1_amd64.deb binaries + mv micro micro-$1 tar -czf micro-$1-linux64.tar.gz micro-$1 mv micro-$1-linux64.tar.gz binaries diff --git a/tools/nightly-release.sh b/tools/nightly-release.sh index cb52b43e..7cc4dcf8 100755 --- a/tools/nightly-release.sh +++ b/tools/nightly-release.sh @@ -30,6 +30,7 @@ hub release edit nightly \ --attach "binaries/micro-$1-osx.tar.gz" \ --attach "binaries/micro-$1-linux64.tar.gz" \ --attach "binaries/micro-$1-linux64-static.tar.gz" \ + --attach "binaries/micro_$1_amd64.deb" \ --attach "binaries/micro-$1-linux32.tar.gz" \ --attach "binaries/micro-$1-linux-arm.tar.gz" \ --attach "binaries/micro-$1-linux-arm64.tar.gz" \ diff --git a/tools/package-deb.sh b/tools/package-deb.sh new file mode 100644 index 00000000..89190571 --- /dev/null +++ b/tools/package-deb.sh @@ -0,0 +1 @@ +fpm -s dir -t deb --name micro --version $1 --deb-recommends xclip --description "A modern and intuitive terminal-based text editor" ./micro=/usr/bin/micro ./assets/packaging/micro.1=/usr/share/man/man1/micro.1 diff --git a/tools/pre-release.sh b/tools/pre-release.sh index 4cdbb331..1ff3e144 100755 --- a/tools/pre-release.sh +++ b/tools/pre-release.sh @@ -23,6 +23,7 @@ hub release create $tag \ --attach "binaries/micro-$1-osx.tar.gz" \ --attach "binaries/micro-$1-linux64.tar.gz" \ --attach "binaries/micro-$1-linux64-static.tar.gz" \ + --attach "binaries/micro_$1_amd64.deb" \ --attach "binaries/micro-$1-linux32.tar.gz" \ --attach "binaries/micro-$1-linux-arm.tar.gz" \ --attach "binaries/micro-$1-linux-arm64.tar.gz" \ diff --git a/tools/release.sh b/tools/release.sh index 66ec7344..d032d1e6 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -22,6 +22,7 @@ hub release create $tag \ --attach "binaries/micro-$1-osx.tar.gz" \ --attach "binaries/micro-$1-linux64.tar.gz" \ --attach "binaries/micro-$1-linux64-static.tar.gz" \ + --attach "binaries/micro_$1_amd64.deb" \ --attach "binaries/micro-$1-linux32.tar.gz" \ --attach "binaries/micro-$1-linux-arm.tar.gz" \ --attach "binaries/micro-$1-linux-arm64.tar.gz" \