Skip to content

Commit

Permalink
add go1.13 build constraints to track2 (#6968)
Browse files Browse the repository at this point in the history
* add go1.13 build constraints to track2

exclude all track2 source files from the build for versions of Go
earlier than 1.13.
add track2 back to track1 CI to ensure constraints work

* fix grep, exclude track2 tests

* add verbose flag to vet
  • Loading branch information
jhendrixMSFT authored Jan 15, 2020
1 parent a667766 commit d154b39
Show file tree
Hide file tree
Showing 31 changed files with 62 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
GOPATH: '$(system.defaultWorkingDirectory)/work'
sdkPath: '$(GOPATH)/src/github.com/$(build.repository.name)'
IGNORE_BREAKING_CHANGES: true
go.list.filter: 'grep -v vendor | grep -v azure-sdk-for-go/sdk'
go.list.filter: '| grep -v vendor'

steps:
- script: |
Expand All @@ -48,7 +48,7 @@ jobs:
go get -u golang.org/x/lint/golint
workingDirectory: '$(sdkPath)'
displayName: 'Install Dependencies'
- script: go vet $(go list ./... $(go.list.filter))
- script: go vet -v $(go list ./... $(go.list.filter))
workingDirectory: '$(sdkPath)'
displayName: 'Vet'
- script: go build -v $(go list ./... $(go.list.filter))
Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/core.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/credential.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright 2017 Microsoft Corporation. All rights reserved.
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/error.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/headers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/log.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/log_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_anonymous_credential.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_anonymous_credential_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_body_download.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_body_download_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_logging.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_logging_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_retry.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_retry_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_telemetry.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_telemetry_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_unique_request_id.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/policy_unique_request_id_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/progress.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/progress_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/request.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/request_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/response.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/response_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/transport_default_http_client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/internal/atomic/atomic.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/internal/mock/mock.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down
2 changes: 2 additions & 0 deletions sdk/internal/uuid/uuid.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build go1.13

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Expand Down

0 comments on commit d154b39

Please sign in to comment.