From a425b3719765b5064c10d413915d2fe759b9c79f Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Sat, 28 Oct 2023 10:50:27 -0400 Subject: [PATCH] Bump major version to v2. Drop support for the old riscv in favor of the official riscv64 (see #168). --- Dockerfile.riscv | 23 ----------------------- go.mod | 2 +- test_crosscompile.sh | 10 +++------- 3 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 Dockerfile.riscv diff --git a/Dockerfile.riscv b/Dockerfile.riscv deleted file mode 100644 index 118ec69..0000000 --- a/Dockerfile.riscv +++ /dev/null @@ -1,23 +0,0 @@ -# NOTE: Using 1.18.2 as a base to build the RISCV compiler, the resulting version is based on go1.6. -FROM golang:1.18.2 - -# Clone and complie a riscv compatible version of the go compiler. -RUN git clone https://review.gerrithub.io/riscv/riscv-go /riscv-go -# riscvdev branch HEAD as of 2019-06-29. -RUN cd /riscv-go && git checkout 04885fddd096d09d4450726064d06dd107e374bf -ENV PATH=/riscv-go/misc/riscv:/riscv-go/bin:$PATH -RUN cd /riscv-go/src && GOROOT_BOOTSTRAP=$(go env GOROOT) ./make.bash -ENV GOROOT=/riscv-go - -# Set the base env. -ENV GOOS=linux GOARCH=riscv CGO_ENABLED=0 GOFLAGS='-v -ldflags=-s -ldflags=-w' - -# Pre compile the stdlib. -RUN go build -a std - -# Add the code to the image. -WORKDIR pty -ADD . . - -# Build the lib. -RUN go build diff --git a/go.mod b/go.mod index b099e3f..14948d3 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/creack/pty +module github.com/creack/pty/v2 go 1.18 diff --git a/test_crosscompile.sh b/test_crosscompile.sh index b5b5e8a..40df89a 100755 --- a/test_crosscompile.sh +++ b/test_crosscompile.sh @@ -45,16 +45,12 @@ if ! hash docker; then return fi -echo2 "Build for linux." -echo2 " - linux/riscv" -docker build -t creack-pty-test -f Dockerfile.riscv . - -# Golang dropped support for darwin 32bits since go1.15. Make sure the lib still compile with go1.18.2 on those archs. +# Golang dropped support for darwin 32bits since go1.15. Make sure the lib still compile with go1.14 on those archs. echo2 "Build for darwin (32bits)." echo2 " - darwin/386" -docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.18.2 --build-arg=GOOS=darwin --build-arg=GOARCH=386 . +docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.14 --build-arg=GOOS=darwin --build-arg=GOARCH=386 . echo2 " - darwin/arm" -docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.18.2 --build-arg=GOOS=darwin --build-arg=GOARCH=arm . +docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.14 --build-arg=GOOS=darwin --build-arg=GOARCH=arm . # Run a single test for an old go version. Would be best with go1.0, but not available on Dockerhub. # Using 1.6 as it is the base version for the RISCV compiler.