Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce03429

Browse files
authored
Merge pull request#661 from symfony-cli/platform-to-upsun-products
Rename Platform.sh to Upsun Fixed and Upsun to Upsun Flex
2 parents8edf515 +d9a246e commitce03429

16 files changed

+92
-92
lines changed

‎book/checkout.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ func (b *Book) Checkout(step string) error {
119119
printBanner("<comment>[WEB]</> Stopping the Local Web Server",b.Debug)
120120
executeCommand([]string{"symfony","server:stop"},b.Debug,true,nil)
121121

122-
brand:=upsun.GuessCloudFromDirectory(b.Dir)
123-
printBanner(fmt.Sprintf("<comment>[WEB]</> Stopping the %s tunnel",brand.Name),b.Debug)
122+
product:=upsun.GuessProductFromDirectory(b.Dir)
123+
printBanner(fmt.Sprintf("<comment>[WEB]</> Stopping the %s tunnel",product.Name),b.Debug)
124124
iferr:=executeCommand([]string{"symfony","tunnel:close","-y"},b.Debug,true,nil);err!=nil {
125125
returnerr
126126
}

‎commands/cloud_env_debug.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var cloudEnvDebugCmd = &console.Command{
4949
iferr!=nil {
5050
returnerr
5151
}
52-
prefix:=upsun.GuessCloudFromCommandName(c.Command.UserName).CommandPrefix
52+
prefix:=upsun.GuessProductFromCommandName(c.Command.UserName).CommandPrefix
5353

5454
projectID:=c.String("project")
5555
ifprojectID=="" {

‎commands/doctrine_server_version_check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ As the database is not available when Doctrine is warming up its cache on %s,
7373
you need to explicitly set the database version in the ".env" or "config/packages/doctrine.yaml" file.
7474
7575
Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml".
76-
`,configFile,dbName,upsun.GuessCloudFromDirectory(projectDir).Name,dbVersion)
76+
`,configFile,dbName,upsun.GuessProductFromDirectory(projectDir).Name,dbVersion)
7777
}
7878

7979
returnnil

‎commands/init_templating.go‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ type nopCloser struct {
4747

4848
func (nopCloser)Close()error {returnnil }
4949

50-
funccreateRequiredFilesProject(brand upsun.CloudBrand,rootDirectory,projectSlug,templateNamestring,minorPHPVersionstring,cloudServices []*CloudService,dump,forcebool) ([]string,error) {
50+
funccreateRequiredFilesProject(product upsun.CloudProduct,rootDirectory,projectSlug,templateNamestring,minorPHPVersionstring,cloudServices []*CloudService,dump,forcebool) ([]string,error) {
5151
createdFiles:= []string{}
52-
templates,err:=getTemplates(brand,rootDirectory,templateName,minorPHPVersion)
52+
templates,err:=getTemplates(product,rootDirectory,templateName,minorPHPVersion)
5353
iferr!=nil {
5454
returnnil,errors.Wrap(err,"could not determine template to use")
5555
}
@@ -158,7 +158,7 @@ func isValidFilePath(toTest string) bool {
158158
returntrue
159159
}
160160

161-
funcgetTemplates(brand upsun.CloudBrand,rootDirectory,chosenTemplateNamestring,minorPHPVersionstring) (map[string]*template.Template,error) {
161+
funcgetTemplates(product upsun.CloudProduct,rootDirectory,chosenTemplateNamestring,minorPHPVersionstring) (map[string]*template.Template,error) {
162162
varfoundTemplate*configTemplate
163163

164164
s:=terminal.NewSpinner(terminal.Stderr)
@@ -186,7 +186,7 @@ func getTemplates(brand upsun.CloudBrand, rootDirectory, chosenTemplateName stri
186186
}
187187
}
188188

189-
ifbrand==upsun.UpsunBrand {
189+
ifproduct==upsun.Flex {
190190
directory=filepath.Join(directory,"upsun")
191191
}
192192
ifisURL,isFile:=isValidURL(chosenTemplateName),isValidFilePath(chosenTemplateName);isURL||isFile {
@@ -298,7 +298,7 @@ func getTemplates(brand upsun.CloudBrand, rootDirectory, chosenTemplateName stri
298298

299299
templateFuncs:=getTemplateFuncs(rootDirectory,minorPHPVersion)
300300
vartemplatesmap[string]*template.Template
301-
ifbrand==upsun.UpsunBrand {
301+
ifproduct==upsun.Flex {
302302
templates=map[string]*template.Template{
303303
".upsun/config.yaml":template.Must(template.New("output").Funcs(templateFuncs).Parse(foundTemplate.Template)),
304304
"php.ini":template.Must(template.New("output").Funcs(templateFuncs).Parse(string(phpini))),

‎commands/init_templating_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestCreateRequiredFilesProject(t *testing.T) {
5050
},
5151
}
5252

53-
if_,err:=createRequiredFilesProject(upsun.PlatformshBrand,projectDir,slug,"","8.0",services,false,true);err!=nil {
53+
if_,err:=createRequiredFilesProject(upsun.Fixed,projectDir,slug,"","8.0",services,false,true);err!=nil {
5454
panic(err)
5555
}
5656

@@ -98,7 +98,7 @@ func TestCreateRequiredFilesProjectForUpsun(t *testing.T) {
9898
},
9999
}
100100

101-
if_,err:=createRequiredFilesProject(upsun.UpsunBrand,projectDir,slug,"","8.0",services,false,true);err!=nil {
101+
if_,err:=createRequiredFilesProject(upsun.Flex,projectDir,slug,"","8.0",services,false,true);err!=nil {
102102
panic(err)
103103
}
104104

‎commands/local_new.go‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,11 @@ var localNewCmd = &console.Command{
201201
returnerr
202202
}
203203
}
204-
brand:=upsun.PlatformshBrand
204+
product:=upsun.Fixed
205205
ifc.Bool("upsun") {
206-
brand=upsun.UpsunBrand
206+
product=upsun.Flex
207207
}
208-
iferr:=initCloud(c,brand,minorPHPVersion,dir);err!=nil {
208+
iferr:=initCloud(c,product,minorPHPVersion,dir);err!=nil {
209209
returnerr
210210
}
211211
}
@@ -234,24 +234,24 @@ func isEmpty(dir string) (bool, error) {
234234
returnfalse,err
235235
}
236236

237-
funcinitCloud(c*console.Context,brand upsun.CloudBrand,minorPHPVersion,dirstring)error {
238-
terminal.Printfln("* Adding %s configuration",brand)
237+
funcinitCloud(c*console.Context,product upsun.CloudProduct,minorPHPVersion,dirstring)error {
238+
terminal.Printfln("* Adding %s configuration",product)
239239

240240
cloudServices,err:=parseCloudServices(dir,c.StringSlice("service"))
241241
iferr!=nil {
242242
returnerr
243243
}
244244

245245
// FIXME: display or hide output based on debug flag
246-
_,err=createRequiredFilesProject(brand,dir,"app","",minorPHPVersion,cloudServices,c.Bool("dump"),c.Bool("force"))
246+
_,err=createRequiredFilesProject(product,dir,"app","",minorPHPVersion,cloudServices,c.Bool("dump"),c.Bool("force"))
247247
iferr!=nil {
248248
returnerr
249249
}
250250

251251
if!c.Bool("no-git") {
252252
returnnil
253253
}
254-
buf,err:=git.AddAndCommit(dir, []string{"."},fmt.Sprintf("Add %s configuration",brand),c.Bool("debug"))
254+
buf,err:=git.AddAndCommit(dir, []string{"."},fmt.Sprintf("Add %s configuration",product),c.Bool("debug"))
255255
iferr!=nil {
256256
fmt.Print(buf.String())
257257
}

‎commands/project_init.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ Templates used by this tool are fetched from ` + templatesGitRepository + `.
8181
returnerr
8282
}
8383

84-
brand:=upsun.PlatformshBrand
84+
product:=upsun.Fixed
8585
ifc.Bool("upsun") {
86-
brand=upsun.UpsunBrand
86+
product=upsun.Flex
8787
}
88-
createdFiles,err:=createRequiredFilesProject(brand,projectDir,slug,c.String("template"),minorPHPVersion,cloudServices,c.Bool("dump"),c.Bool("force"))
88+
createdFiles,err:=createRequiredFilesProject(product,projectDir,slug,c.String("template"),minorPHPVersion,cloudServices,c.Bool("dump"),c.Bool("force"))
8989
iferr!=nil {
9090
returnerr
9191
}
@@ -107,7 +107,7 @@ Templates used by this tool are fetched from ` + templatesGitRepository + `.
107107
ui.Section("Next Steps")
108108

109109
terminal.Println(" * Adapt the generated files if needed")
110-
terminal.Printf(" * Commit them: <info>git add %s && git commit -m\"Add %s configuration\"</>\n",strings.Join(createdFiles," "),brand)
110+
terminal.Printf(" * Commit them: <info>git add %s && git commit -m\"Add %s configuration\"</>\n",strings.Join(createdFiles," "),product)
111111
terminal.Printf(" * Deploy: <info>%s deploy</>\n",c.App.HelpName)
112112
}else {
113113
terminal.Printf("Deploy the project via <info>%s deploy</>.\n",c.App.HelpName)

‎envs/local.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ func (l *Local) Relationships() Relationships {
160160
project,err:=upsun.ProjectFromDir(l.Dir,l.Debug)
161161
iferr!=nil {
162162
ifl.Debug {
163-
ifbrand:=upsun.GuessCloudFromDirectory(l.Dir);brand!=upsun.NoBrand {
164-
fmt.Fprintf(os.Stderr,"ERROR: unable to get %s project information\n",brand)
163+
ifproduct:=upsun.GuessProductFromDirectory(l.Dir);product!=upsun.NoProduct {
164+
fmt.Fprintf(os.Stderr,"ERROR: unable to get %s project information\n",product)
165165
}
166166
}
167167
returndockerRel
@@ -199,7 +199,7 @@ func (l *Local) Extra() Envs {
199199
env:=Envs{
200200
"SYMFONY_TUNNEL":l.Tunnel,
201201
"SYMFONY_TUNNEL_ENV":sc,
202-
"SYMFONY_TUNNEL_BRAND":upsun.GuessCloudFromDirectory(l.Dir).Name,
202+
"SYMFONY_TUNNEL_BRAND":upsun.GuessProductFromDirectory(l.Dir).Name,
203203
"SYMFONY_DOCKER_ENV":docker,
204204
}
205205
if_,err:=os.Stat(filepath.Join(l.Dir,".prod"));err==nil {
@@ -229,7 +229,7 @@ func (l *Local) Language() string {
229229
app:=upsun.GuessSelectedAppByWd(upsun.FindLocalApplications(projectRoot))
230230
ifapp==nil {
231231
ifl.Debug {
232-
ifupsun.GuessCloudFromDirectory(l.Dir)!=upsun.NoBrand {
232+
ifupsun.GuessProductFromDirectory(l.Dir)!=upsun.NoProduct {
233233
fmt.Fprint(os.Stderr,"ERROR: unable to get project configuration\n")
234234
}
235235
}

‎envs/local_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (s *LocalSuite) TestExtra(c *C) {
4747
c.Assert(l.Extra(),DeepEquals,Envs{
4848
"SYMFONY_TUNNEL":"",
4949
"SYMFONY_TUNNEL_ENV":"",
50-
"SYMFONY_TUNNEL_BRAND":"Upsun",
50+
"SYMFONY_TUNNEL_BRAND":"Upsun Flex",
5151
"SYMFONY_DOCKER_ENV":"",
5252
})
5353
}

‎envs/local_tunnel.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ type pshtunnel struct {
4444
}
4545

4646
func (l*Local)relationshipsFromTunnel()Relationships {
47-
brand:=upsun.GuessCloudFromDirectory(l.Dir)
47+
product:=upsun.GuessProductFromDirectory(l.Dir)
4848
project,err:=upsun.ProjectFromDir(l.Dir,l.Debug)
4949
iferr!=nil {
5050
ifl.Debug {
51-
fmt.Fprintf(os.Stderr,"WARNING: unable to detect %s project: %s\n",brand,err)
51+
fmt.Fprintf(os.Stderr,"WARNING: unable to detect %s project: %s\n",product,err)
5252
}
5353
returnnil
5454
}
@@ -57,7 +57,7 @@ func (l *Local) relationshipsFromTunnel() Relationships {
5757
iferr!=nil {
5858
userHomeDir=""
5959
}
60-
tunnelFile:=filepath.Join(userHomeDir,brand.CLIConfigPath,"tunnel-info.json")
60+
tunnelFile:=filepath.Join(userHomeDir,product.CLIConfigPath,"tunnel-info.json")
6161
data,err:=os.ReadFile(tunnelFile)
6262
iferr!=nil {
6363
ifl.Debug {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp