mirror of
https://github.com/dnote/dnote
synced 2026-03-15 15:05:51 +01:00
Improve highlight (#174)
* Prefix releases for cli * Allow editors to highlight markdown * Fix dev script
This commit is contained in:
parent
1b61f26c1f
commit
e8d920030d
4 changed files with 16 additions and 14 deletions
|
|
@ -1,10 +1,11 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
# dev.sh builds a new binary and replaces the old one in the PATH with it
|
||||
|
||||
sudo rm "$(which dnote)" $GOPATH/bin/cli
|
||||
sudo rm -rf "$(which dnote)" "$GOPATH/bin/cli"
|
||||
|
||||
# change tags to darwin if on macos
|
||||
go install -ldflags "-X main.apiEndpoint=http://127.0.0.1:5000" --tags "linux fts5" .
|
||||
go install -ldflags "-X main.apiEndpoint=http://127.0.0.1:5000" --tags "linux fts5" "$GOPATH/src/github.com/dnote/dnote/cli/."
|
||||
|
||||
sudo ln -s $GOPATH/bin/cli /usr/local/bin/dnote
|
||||
sudo ln -s "$GOPATH/bin/cli" /usr/local/bin/dnote
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@ if ! command_exists hub; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $homebrewRepoDir ]; then
|
||||
if [ ! -d "$homebrewRepoDir" ]; then
|
||||
echo "homebrew-dnote not found locally. did you clone it?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. push tag
|
||||
version=$1
|
||||
version_tag="v$version"
|
||||
version_tag="cli-v$version"
|
||||
|
||||
echo "* tagging and pushing the tag"
|
||||
git tag -a "$version_tag" -m "Release $version_tag"
|
||||
|
|
@ -55,4 +55,4 @@ hub release create \
|
|||
|
||||
# 3. Release on Homebrew
|
||||
homebrew_sha256=$(shasum -a 256 "./build/dnote_${version}_darwin_amd64.tar.gz" | cut -d ' ' -f 1)
|
||||
(cd $homebrewRepoDir && ./release.sh "$version" "$homebrew_sha256")
|
||||
(cd "$homebrewRepoDir" && ./release.sh "$version" "$homebrew_sha256")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue