diff --git a/Makefile b/Makefile index d40923d..083bab3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ all: - @./build.sh + @scripts/build.sh clean: @rm -f jj @@ -11,4 +11,4 @@ uninstall: @rm -f /usr/local/bin/jj package: - @./build.sh package + @scripts/build.sh package diff --git a/go.sum b/go.sum index ec72e5b..359db07 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/tidwall/gjson v1.6.8/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/gjson v1.7.1 h1:hwkZ6V1/EF8FxNhKJrIXQwSscyl2yWCZ1SkOCQYHSHA= github.com/tidwall/gjson v1.7.1/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk= +github.com/tidwall/gjson v1.7.2 h1:Mlc6J3RVIjBPiXounGdbdsk3WFwB195CLunMD/BtrOs= +github.com/tidwall/gjson v1.7.2/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk= github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= diff --git a/scripts/DEPLOY.md b/scripts/DEPLOY.md new file mode 100644 index 0000000..da71928 --- /dev/null +++ b/scripts/DEPLOY.md @@ -0,0 +1,12 @@ + +- Update to the correct gjson/sjson version in go.mod +- Run `make` +- Update the version of jj in `build.sh`. +- `git add files` +- `git tag v1.7.2` where `1.7.2` is the version in `build.sh` +- `git push` and `git push --tags` +- Run `make package` +- Edit new tag on Github and add the package files +- Run `openssl sha256 packages/jj-1.7.2-darwin-amd64.zip` where `1.7.2` is the version in `build.sh` +- Edit https://github.com/tidwall/homebrew-jj/edit/master/jj.rb and change HOMEBREW_JJ_VERSION and HOMEBREW_JJ_SHA +- Done diff --git a/build.sh b/scripts/build.sh similarity index 92% rename from build.sh rename to scripts/build.sh index fb18f03..e6e7cd9 100755 --- a/build.sh +++ b/scripts/build.sh @@ -8,13 +8,13 @@ set -e VERSION="1.7.2" -cd $(dirname "${BASH_SOURCE[0]}") +cd $(dirname "${BASH_SOURCE[0]}")/.. package(){ echo Packaging $1 Binary bdir=jj-${VERSION}-$2-$3 rm -rf packages/$bdir && mkdir -p packages/$bdir - GOOS=$2 GOARCH=$3 ./build.sh + GOOS=$2 GOARCH=$3 scripts/build.sh if [ "$2" == "windows" ]; then mv jj packages/$bdir/jj.exe else