Skip to content

Commit

Permalink
Moving Storage to an Independent Repository (Azure#556)
Browse files Browse the repository at this point in the history
* Updating CI to use Go 1.8.

Go 1.8 was released on Thursday, February 16th. Many of our partners
have adopted and we need to ensure that we support the most recent
version.

* Replacing storage folder with submodule.

In order to allow for more independent growth of the storage package,
we've given it its own repository. This change updates the main
repository to use a submodule in order to prevent breaking changes for
folks using storage today who do not want to migrate to the new
repository.

* Updating submodule target URL.

There is an existing naming convention for Azure Storage repositories.
the repo has been updated to match that convention, this updates the
submodule to point to the new URL.

* Responding to review feedback.

* Updating submodule to ref v8.1.0 storage version.
  • Loading branch information
marstr committed Mar 9, 2017
1 parent adb839f commit 040f31c
Show file tree
Hide file tree
Showing 26 changed files with 15 additions and 7,674 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "storage"]
path = storage
url = https://github.com/Azure/azure-storage-go
branch = v0.1.0
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: false

language: go

go: 1.7
go: 1.8

install:
- go get -u github.com/golang/lint/golint
Expand All @@ -16,14 +16,10 @@ script:
- bash rungas.sh
- test -z "$(gofmt -s -l $(find ./arm/* -type d -print) | tee /dev/stderr)"
- test -z "$(gofmt -s -l -w management | tee /dev/stderr)"
- test -z "$(gofmt -s -l -w storage | tee /dev/stderr)"
- test -z "$(gofmt -s -l -w Gododir | tee /dev/stderr)"
- test -z "$(go build $(find ./* -type d -print | grep -v '^./vendor$') | tee /dev/stderr)"
- test -z "$(go build $(find ./* -type d -print | grep -v '^./vendor$' | grep -v '^./storage$') | tee /dev/stderr)"
- test -z "$(go vet $(find ./arm/* -type d -print) | tee /dev/stderr)"
- test -z "$(golint ./arm/... | tee /dev/stderr)"
- go test -v ./storage/... -check.v
- test -z "$(golint ./storage/... | tee /dev/stderr)"
- go vet ./storage/...
- go test -v ./management/...
- test -z "$(golint ./management/... | grep -v 'should have comment' | grep -v 'stutters' | tee /dev/stderr)"
- go vet ./management/...
Expand Down
14 changes: 9 additions & 5 deletions Gododir/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,15 +463,15 @@ func initAndAddService(service *service, inputPrefix, plane string) {
}

func tasks(p *do.Project) {
p.Task("default", do.S{"setvars", "generate:all", "storage"}, nil)
p.Task("default", do.S{"setvars", "generate:all", "management"}, nil)
p.Task("setvars", nil, setVars)
p.Use("generate", generateTasks)
p.Use("gofmt", formatTasks)
p.Use("gobuild", buildTasks)
p.Use("golint", lintTasks)
p.Use("govet", vetTasks)
p.Use("delete", deleteTasks)
p.Task("storage", do.S{"setvars"}, storageVersion)
p.Task("management", do.S{"setvars"}, managementVersion)
}

func setVars(c *do.Context) {
Expand Down Expand Up @@ -507,7 +507,7 @@ func generate(service *service) {
"-OutputDirectory", service.Output,
"-Modeler", "Swagger",
"-pv", sdkVersion,
"-SkipValidation",
"-SkipValidation")
autorest.Dir = filepath.Join(autorestDir, "autorest")
err = runner(autorest)
if err != nil {
Expand Down Expand Up @@ -584,8 +584,12 @@ func vet(service *service) {
}
}

func storageVersion(c *do.Context) {
versionFile := "storage/version.go"
func managementVersion(c *do.Context) {
version("management")
}

func version(packageName string) {
versionFile := filepath.Join(packageName, "version.go")
os.Remove(versionFile)
template := `package storage
Expand Down
5 changes: 0 additions & 5 deletions storage/README.md

This file was deleted.

223 changes: 0 additions & 223 deletions storage/authorization.go

This file was deleted.

Loading

0 comments on commit 040f31c

Please sign in to comment.