Skip to content

Commit

Permalink
fix: append bundle name to file name if set
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Aug 12, 2021
1 parent 575541d commit c7026c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"net/url"
"os"
"path"
"path/filepath"
"sort"
"strings"
textTemplate "text/template"
Expand Down Expand Up @@ -437,11 +438,15 @@ func uploadUnsignedApp(c echo.Context) error {
} else if idType == formNames.FormIdCustom {
signArgs += " -b " + userBundleId
}
bundleName := c.FormValue(formNames.FormBundleName)
if bundleName != "" {
fileName = fmt.Sprintf("%s (%s)%s",
strings.TrimSuffix(fileName, filepath.Ext(fileName)), bundleName, filepath.Ext(fileName))
}
app, err := storage.Apps.New(file, fileName, profile, signArgs, userBundleId, builderId)
if err != nil {
return err
}
bundleName := c.FormValue(formNames.FormBundleName)
if bundleName != "" {
if err := app.SetString(storage.AppBundleName, bundleName); err != nil {
return err
Expand Down

0 comments on commit c7026c2

Please sign in to comment.