Skip to content

Commit

Permalink
Update go to 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyworld committed May 4, 2022
1 parent 8ff5847 commit 3da29bd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 49 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ concurrent language.

Generally, Juju is built against the most recent version of Go, with the caveat that Go versions are not incremented during a release cycle. This means that `develop` will typically be using the latest version of Go, but any given release branch may lag by one version or so. Check the `go.mod` file at the root of the project for the targeted version of Go, as this is authoritative.

For example, the following indicates that Go 1.17 is targeted:
For example, the following indicates that Go 1.18 is targeted:

```
module github.com/juju/juju
go 1.17
go 1.18
```

### Official distribution
Expand All @@ -51,7 +51,7 @@ Go can be [installed](https://golang.org/doc/install#install) from the official

[Snap](https://snapcraft.io/go) may also be used to install Go on Linux.

snap install go --channel=1.17/stable --classic
snap install go --channel=1.18/stable --classic

## Build Juju and its dependencies

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,11 @@ endif
# PPA includes the required mongodb-server binaries.
install-snap-dependencies:
## install-snap-dependencies: Install the supported snap dependencies
ifeq ($(shell go version | grep -o "go1.17" || true),go1.17)
@echo Using installed go-1.17
ifeq ($(shell go version | grep -o "go1.18" || true),go1.18)
@echo Using installed go-1.18
else
@echo Installing go-1.17 snap
@sudo snap install go --channel=1.17/stable --classic
@echo Installing go-1.18 snap
@sudo snap install go --channel=1.18/stable --classic
endif

WAIT_FOR_DPKG=bash -c '. "${PROJECT_DIR}/make_functions.sh"; wait_for_dpkg "$$@"' wait_for_dpkg
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/juju/juju

go 1.17
go 1.18

require (
github.com/Azure/azure-sdk-for-go v62.2.0+incompatible
Expand Down
Loading

0 comments on commit 3da29bd

Please sign in to comment.