Skip to content

Commit b58e9db

Browse files
authored
Update to Go 1.19, quiter output, add release instructions (#4)
* Update to Go 1.19, quiter output, add release instructions * Fighting with Markdown
1 parent 5c898eb commit b58e9db

File tree

4 files changed

+35
-7
lines changed

4 files changed

+35
-7
lines changed

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ go_dependencies()
2929

3030
go_rules_dependencies()
3131

32-
go_register_toolchains(version = "1.18.3")
32+
go_register_toolchains(version = "1.19")
3333

3434
gazelle_dependencies()
3535

docs/release.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Cutting a new release
2+
3+
1. Submit all the code you want to be in the release.
4+
2. Create a new tag for the release with `git tag vX.Y.Z`
5+
- You can get the current latest tag with `git describe --tags --abbrev=0`
6+
3. Push the tag with `git push origin vX.Y.Z`
7+
4. Create an archive with `git archive --output=rules_gqlgen-vX.Y.Z.zip vX.Y.Z`
8+
5. Create the release with `gh release create vX.Y.Z rules_gqlgen-vX.Y.Z.zip --generate-notes`
9+
6. Get a SHA256 digest of the archive with `sha256sum rules_gqlgen-vX.Y.Z.zip`
10+
7. Update the description of the release, prepending the usage instructions.
11+
- They should look something like:
12+
````markdown
13+
# `WORKSPACE` code
14+
15+
```bazel
16+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
17+
18+
http_archive(
19+
name = "com_siliconally_rules_gqlgen",
20+
sha256 = "<sha256sum output>",
21+
urls = [
22+
"https://github.com/Silicon-Ally/rules_gqlgen/releases/download/vX.Y.Z/rules_gqlgen-vX.Y.Z.zip",
23+
],
24+
)
25+
```
26+
````
27+
28+
You're done! Congrats on the successful release.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/Silicon-Ally/rules_gqlgen
22

3-
go 1.18
3+
go 1.19
44

55
require (
66
github.com/99designs/gqlgen v0.17.13

gqlgen/generate.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -euxo pipefail
2+
set -euo pipefail
33

44
# Give our input arguments more semantic names, see def.bzl for more info.
55
CONFIG="$1"
@@ -15,7 +15,7 @@ TMP_ROOT="$(mktemp -d)"
1515
export GOROOT="$(realpath "$GOROOT")"
1616
export GOPATH="$TMP_ROOT/gopath"
1717
mkdir "$GOPATH"
18-
unzip -d "$GOPATH" "$GQL_ZIP"
18+
unzip -qq -d "$GOPATH" "$GQL_ZIP"
1919
export GOCACHE="$TMP_ROOT/go-build"
2020
export GOCACHE="$TMP_ROOT/go-build"
2121
# Use our version of the go toolchain, not any local system one.
@@ -37,13 +37,13 @@ chmod 777 go.mod go.sum
3737
$MODCACHER_PATH go.mod "$GOPATH/src"
3838

3939
# Without this, the build will fail with the error:
40-
# ../../external/go_sdk/src/crypto/elliptic/p256_asm.go:24:12: pattern
40+
# ../external/go_sdk/src/crypto/internal/nistec/p256_asm.go:323:12: pattern
4141
# p256_asm_table.bin: cannot embed irregular file p256_asm_table.bin
4242
#
4343
# Embedding fails because it doesn't work on symlinks, so we copy the symlink
4444
# into a hard file. The file is a symlink here because of how the go_path rule
4545
# generates the directory in 'copy' mode.
46-
ASM="external/go_sdk/src/crypto/elliptic/p256_asm_table.bin"
46+
ASM="external/go_sdk/src/crypto/internal/nistec/p256_asm_table.bin"
4747
cp --remove-destination `readlink $ASM` "$ASM"
4848

4949
# See https://github.com/99designs/gqlgen/issues/2081#issuecomment-1126099404
@@ -62,7 +62,7 @@ EOL
6262
cp "$CONFIG" "$CONFIG_DIR"
6363
cd "$CONFIG_DIR"
6464

65-
go mod tidy
65+
go mod tidy > /dev/null 2>&1
6666
go mod vendor
6767
go run -mod=readonly github.com/99designs/gqlgen generate \
6868
--config="$(basename $CONFIG)" \

0 commit comments

Comments
 (0)