mirror of
				https://github.com/docker/compose.git
				synced 2025-10-31 03:03:49 +01:00 
			
		
		
		
	Don't cd into a directory before building
We pass the directory to build to the `go build` command
This commit is contained in:
		
							parent
							
								
									756836ffab
								
							
						
					
					
						commit
						e6597d6139
					
				
							
								
								
									
										14
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								Makefile
									
									
									
									
									
								
							| @ -40,20 +40,20 @@ protos: | |||||||
| 	@protoc -I. --go_out=plugins=grpc,paths=source_relative:. ${PROTOS} | 	@protoc -I. --go_out=plugins=grpc,paths=source_relative:. ${PROTOS} | ||||||
| 
 | 
 | ||||||
| cli: protos | cli: protos | ||||||
| 	cd cli && GOOS=${GOOS} GOARCH=${GOARCH} go build -v -o ../bin/docker | 	GOOS=${GOOS} GOARCH=${GOARCH} go build -v -o bin/docker ./cli | ||||||
| 
 | 
 | ||||||
| example: protos | example: protos | ||||||
| 	cd example/backend && go build -v -o ../../bin/backend-example | 	cd example/backend && go build -v -o ../../bin/backend-example | ||||||
| 
 | 
 | ||||||
| xcli: cli | xcli: cli | ||||||
| 	cd cmd && GOOS=linux 	GOARCH=amd64 	go build -v -o ../bin/docker-linux-amd64 | 	GOOS=linux   GOARCH=amd64 go build -v -o bin/docker-linux-amd64 ./cli | ||||||
| 	cd cmd && GOOS=darwin 	GOARCH=amd64 	go build -v -o ../bin/docker-darwin-amd64 | 	GOOS=darwin  GOARCH=amd64 go build -v -o bin/docker-darwin-amd64 ./cli | ||||||
| 	cd cmd && GOOS=windows 	GOARCH=amd64 	go build -v -o ../bin/docker-windows-amd64.exe | 	GOOS=windows GOARCH=amd64 go build -v -o bin/docker-windows-amd64.exe ./cli | ||||||
| 
 | 
 | ||||||
| xexample: example | xexample: example | ||||||
| 	cd example/backend && GOOS=linux	GOARCH=amd64	go build -v -o ../../bin/backend-example-linux-amd64 | 	GOOS=linux   GOARCH=amd64 go build -v -o bin/backend-example-linux-amd64 ./example/backend | ||||||
| 	cd example/backend && GOOS=darwin	GOARCH=amd64	go build -v -o ../../bin/backend-example-darwin-amd64 | 	GOOS=darwin  GOARCH=amd64 go build -v -o bin/backend-example-darwin-amd64 ./example/backend | ||||||
| 	cd example/backend && GOOS=windows	GOARCH=amd64	go build -v -o ../../bin/backend-example-windows-amd64.exe | 	GOOS=windows GOARCH=amd64 go build -v -o bin/backend-example-windows-amd64.exe ./example/backend | ||||||
| 
 | 
 | ||||||
| dprotos: | dprotos: | ||||||
| 	docker build . \
 | 	docker build . \
 | ||||||
|  | |||||||
| @ -61,7 +61,7 @@ type createOpts struct { | |||||||
| func createCommand() *cobra.Command { | func createCommand() *cobra.Command { | ||||||
| 	var opts createOpts | 	var opts createOpts | ||||||
| 	cmd := &cobra.Command{ | 	cmd := &cobra.Command{ | ||||||
| 		Use:   "create", | 		Use:   "create CONTEXT BACKEND [OPTIONS]", | ||||||
| 		Short: "Create a context", | 		Short: "Create a context", | ||||||
| 		Args:  cobra.ExactArgs(2), | 		Args:  cobra.ExactArgs(2), | ||||||
| 		RunE: func(cmd *cobra.Command, args []string) error { | 		RunE: func(cmd *cobra.Command, args []string) error { | ||||||
| @ -78,6 +78,7 @@ func listCommand() *cobra.Command { | |||||||
| 	cmd := &cobra.Command{ | 	cmd := &cobra.Command{ | ||||||
| 		Use:     "list", | 		Use:     "list", | ||||||
| 		Aliases: []string{"ls"}, | 		Aliases: []string{"ls"}, | ||||||
|  | 		Args:    cobra.NoArgs, | ||||||
| 		RunE: func(cmd *cobra.Command, args []string) error { | 		RunE: func(cmd *cobra.Command, args []string) error { | ||||||
| 			return runList(cmd.Context()) | 			return runList(cmd.Context()) | ||||||
| 		}, | 		}, | ||||||
|  | |||||||
| @ -87,6 +87,7 @@ func (suite *StoreTestSuite) TestGet() { | |||||||
| 	assert.Equal(suite.T(), "description", m.Description) | 	assert.Equal(suite.T(), "description", m.Description) | ||||||
| 	assert.Equal(suite.T(), "type", m.Type) | 	assert.Equal(suite.T(), "type", m.Type) | ||||||
| } | } | ||||||
|  | 
 | ||||||
| func (suite *StoreTestSuite) TestList() { | func (suite *StoreTestSuite) TestList() { | ||||||
| 	err := suite.store.Create("test1", TypeContext{}, nil) | 	err := suite.store.Create("test1", TypeContext{}, nil) | ||||||
| 	assert.Nil(suite.T(), err) | 	assert.Nil(suite.T(), err) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user