mirror of
https://github.com/dnote/dnote
synced 2026-03-16 23:45:52 +01:00
Release CLI 0.11.0 (#404)
* Release CLI 0.11.0 * Update outdated ldflags * Fix release * Fix date
This commit is contained in:
parent
3c5819f1d1
commit
cd80f9b72e
3 changed files with 23 additions and 7 deletions
|
|
@ -139,6 +139,12 @@ The following log documents the history of the server project.
|
|||
|
||||
The following log documentes the history of the CLI project
|
||||
|
||||
### 0.11.0 - 2020-02-05
|
||||
|
||||
#### Added
|
||||
|
||||
- Allow to pass credentials through flags while logging in (#403)
|
||||
|
||||
### 0.10.0 - 2019-09-30
|
||||
|
||||
#### Removed
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# This script installs Dnote into your PATH (/usr/bin/local)
|
||||
# Use it like this:
|
||||
# $ curl https://raw.githubusercontent.com/dnote/dnote/master/cli/install.sh | sh
|
||||
# $ curl https://raw.githubusercontent.com/dnote/dnote/master/install.sh | sh
|
||||
#
|
||||
|
||||
set -eu
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
# build.sh compiles dnote binary for target platforms. It is resonsible for creating
|
||||
# distributable files that can be released by a human or a script.
|
||||
#
|
||||
# It can either cross-compile for different platforms using xgo, simply target a specific
|
||||
# It can either cross-compile for different platforms using xgo, or simply target a specific
|
||||
# platform. Set GOOS and GOARCH environment variables to disable xgo and instead
|
||||
# compile for a specific platform.
|
||||
# compile locally for a specific platform.
|
||||
#
|
||||
# use:
|
||||
# ./scripts/build.sh 0.4.8
|
||||
|
|
@ -19,6 +19,11 @@ projectDir="$dir/../.."
|
|||
basedir="$projectDir/pkg/cli"
|
||||
outputDir="$projectDir/build/cli"
|
||||
|
||||
# xgo has issues when using modules
|
||||
# https://github.com/karalabe/xgo/issues/176
|
||||
# bypass it by copying the project inside a GOPATH
|
||||
goPathBasedir="$GOPATH/src/github.com/dnote/dnote"
|
||||
|
||||
command_exists () {
|
||||
command -v "$1" >/dev/null 2>&1;
|
||||
}
|
||||
|
|
@ -36,7 +41,7 @@ if [[ $1 == v* ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
goVersion=1.12.x
|
||||
goVersion=1.13.x
|
||||
|
||||
get_binary_name() {
|
||||
platform=$1
|
||||
|
|
@ -57,7 +62,7 @@ build() {
|
|||
|
||||
# build binary
|
||||
destDir="$outputDir/$platform-$arch"
|
||||
ldflags="-X main.apiEndpoint=https://api.dnote.io -X main.versionTag=$version"
|
||||
ldflags="-X main.apiEndpoint=https://api.getdnote.com -X main.versionTag=$version"
|
||||
tags="fts5"
|
||||
|
||||
mkdir -p "$destDir"
|
||||
|
|
@ -76,7 +81,9 @@ build() {
|
|||
-ldflags "$ldflags" \
|
||||
--tags "$tags" \
|
||||
--dest="$destDir" \
|
||||
"$basedir"
|
||||
-x \
|
||||
-v \
|
||||
"$goPathBasedir/pkg/cli"
|
||||
fi
|
||||
|
||||
binaryName=$(get_binary_name "$platform")
|
||||
|
|
@ -99,7 +106,10 @@ build() {
|
|||
|
||||
if [ -z "$GOOS" ] && [ -z "$GOARCH" ]; then
|
||||
# fetch tool
|
||||
go get -u github.com/karalabe/xgo
|
||||
go get -u github.com/dnote/xgo
|
||||
|
||||
rm -rf "$GOPATH/src/github.com/dnote/dnote"
|
||||
cp -R "$projectDir" "$goPathBasedir"
|
||||
|
||||
build linux amd64
|
||||
build darwin amd64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue