File tree Expand file tree Collapse file tree
.github/actions/update-plugin-index Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -549,23 +549,19 @@ class Utils {
549549 }
550550}
551551
552- def specificPluginFile = (args && args. length > 0 ) ? new File (args[0 ]) : null
553- if (specificPluginFile) {
554- if (! specificPluginFile. exists() || ! specificPluginFile. isFile()) {
555- System . err. println (" ERROR: Specified file '$specificPluginFile . path ' does not exist or is not a file" )
556- System . exit(1 )
557- }
558- Utils . processPluginFile(specificPluginFile)
559- println (" Processed single file: $specificPluginFile . path " )
552+ def fileArg = (args && args. length > 0 ) ? new File (args[0 ]) : ' grails-plugins' as File
553+
554+ if (fileArg. file) {
555+ Utils . processPluginFile(fileArg)
556+ println (" Processed single file: $fileArg . path " )
560557}
561558else {
562- def rootDir = ' grails-plugins' as File
563- if (! rootDir. exists() || ! rootDir. directory) {
564- System . err. println (" ERROR: Directory 'grails-plugins' not found in ${ ('.' as File).absolutePath} " )
559+ if (! fileArg. exists() || ! fileArg. directory) {
560+ System . err. println (" ERROR: Directory '$fileArg . path ' not found in ${ ('.' as File).absolutePath} " )
565561 System . exit(1 )
566562 }
567563 List<Map > indexEntries = []
568- rootDir . eachFileRecurse(FileType . FILES ) { f ->
564+ fileArg . eachFileRecurse(FileType . FILES ) { f ->
569565 def pluginInfo = Utils . processPluginFile(f)
570566 // Add to index (include everything from YAML)
571567 if (pluginInfo) {
You can’t perform that action at this time.
0 commit comments