@@ -76,16 +76,16 @@ func StackpackPackageCommand(cli *di.Deps) *cobra.Command {
7676 args := & PackageArgs {}
7777 cmd := & cobra.Command {
7878 Use : "package" ,
79- Short : "Package a stackpack into a zip file" ,
80- Long : `Package a stackpack into a zip file.
79+ Short : "Package a stackpack into an .sts file" ,
80+ Long : `Package a stackpack into an .sts file.
8181
82- Creates a zip file containing all required stackpack files and directories:
82+ Creates an .sts file containing all required stackpack files and directories:
8383- provisioning/ (directory)
8484- README.md (file)
8585- resources/ (directory)
8686- stackpack.yaml (file)
8787
88- The zip file is named <stackpack_name>-<version>.zip where the name and
88+ The .sts file is named <stackpack_name>-<version>.sts where the name and
8989version are extracted from stackpack.yaml and created in the current directory.` ,
9090 Example : `# Package stackpack in current directory
9191sts stackpack package
@@ -94,16 +94,16 @@ sts stackpack package
9494sts stackpack package -d ./my-stackpack
9595
9696# Package with custom archive filename
97- sts stackpack package -f my-custom-archive.zip
97+ sts stackpack package -f my-custom-archive.sts
9898
99- # Force overwrite existing zip file
99+ # Force overwrite existing .sts file
100100sts stackpack package --force` ,
101101 RunE : cli .CmdRunE (RunStackpackPackageCommand (args )),
102102 }
103103
104104 cmd .Flags ().StringVarP (& args .StackpackDir , "stackpack-directory" , "d" , "" , "Path to stackpack directory (defaults to current directory)" )
105- cmd .Flags ().StringVarP (& args .ArchiveFile , "archive-file" , "f" , "" , "Path to the zip file to create (defaults to <stackpack_name>-<version>.zip in current directory)" )
106- cmd .Flags ().BoolVar (& args .Force , "force" , false , "Overwrite existing zip file without prompting" )
105+ cmd .Flags ().StringVarP (& args .ArchiveFile , "archive-file" , "f" , "" , "Path to the .sts file to create (defaults to <stackpack_name>-<version>.sts in current directory)" )
106+ cmd .Flags ().BoolVar (& args .Force , "force" , false , "Overwrite existing .sts file without prompting" )
107107
108108 return cmd
109109}
@@ -140,7 +140,7 @@ func RunStackpackPackageCommand(args *PackageArgs) func(cli *di.Deps, cmd *cobra
140140 if err != nil {
141141 return common .NewRuntimeError (fmt .Errorf ("failed to get current working directory: %w" , err ))
142142 }
143- zipFileName := fmt .Sprintf ("%s-%s.zip " , stackpackInfo .Name , stackpackInfo .Version )
143+ zipFileName := fmt .Sprintf ("%s-%s.sts " , stackpackInfo .Name , stackpackInfo .Version )
144144 args .ArchiveFile = filepath .Join (currentDir , zipFileName )
145145 } else {
146146 // Convert to absolute path
@@ -156,9 +156,9 @@ func RunStackpackPackageCommand(args *PackageArgs) func(cli *di.Deps, cmd *cobra
156156 return common .NewCLIArgParseError (err )
157157 }
158158
159- // Check if zip file exists and handle force flag
159+ // Check if .sts file exists and handle force flag
160160 if _ , err := os .Stat (args .ArchiveFile ); err == nil && ! args .Force {
161- return common .NewRuntimeError (fmt .Errorf ("zip file already exists: %s (use --force to overwrite)" , args .ArchiveFile ))
161+ return common .NewRuntimeError (fmt .Errorf (".sts file already exists: %s (use --force to overwrite)" , args .ArchiveFile ))
162162 }
163163
164164 // Create output directory if it doesn't exist
@@ -167,9 +167,9 @@ func RunStackpackPackageCommand(args *PackageArgs) func(cli *di.Deps, cmd *cobra
167167 return common .NewRuntimeError (fmt .Errorf ("failed to create output directory: %w" , err ))
168168 }
169169
170- // Create zip file
170+ // Create .sts file
171171 if err := createStackpackZip (args .StackpackDir , args .ArchiveFile ); err != nil {
172- return common .NewRuntimeError (fmt .Errorf ("failed to create zip file: %w" , err ))
172+ return common .NewRuntimeError (fmt .Errorf ("failed to create .sts file: %w" , err ))
173173 }
174174
175175 if cli .IsJson () {
@@ -184,7 +184,7 @@ func RunStackpackPackageCommand(args *PackageArgs) func(cli *di.Deps, cmd *cobra
184184 cli .Printer .Successf ("Stackpack packaged successfully!" )
185185 cli .Printer .PrintLn ("" )
186186 cli .Printer .PrintLn (fmt .Sprintf ("Stackpack: %s (v%s)" , stackpackInfo .Name , stackpackInfo .Version ))
187- cli .Printer .PrintLn (fmt .Sprintf ("Zip file: %s" , args .ArchiveFile ))
187+ cli .Printer .PrintLn (fmt .Sprintf (".sts file: %s" , args .ArchiveFile ))
188188 }
189189
190190 return nil
@@ -207,7 +207,7 @@ func validateStackpackDirectory(dir string) error {
207207func createStackpackZip (sourceDir , zipPath string ) error {
208208 zipFile , err := os .Create (zipPath )
209209 if err != nil {
210- return fmt .Errorf ("failed to create zip file: %w" , err )
210+ return fmt .Errorf ("failed to create .sts file: %w" , err )
211211 }
212212 defer zipFile .Close ()
213213
0 commit comments