Skip to content

BUG: Fix remotes maintenance scripts#1021

Merged
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
jhlegarreta:FixRemotesMaintenanceScripts
Jun 17, 2019
Merged

BUG: Fix remotes maintenance scripts#1021
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
jhlegarreta:FixRemotesMaintenanceScripts

Conversation

@jhlegarreta
Copy link
Copy Markdown
Member

Fix remotes maintenance scripts:

  • Fix scripts input arguments command not found error adding the test
    command over each argument.Fixes:
    ./Utilities/Maintenance/ApplyScriptToRemotes.sh: line 82:
    UpdateTestingMacrosNames: command not found
    ./Utilities/Maintenance/ApplyScriptToRemotes.sh: line 82: ENH: Update
    ITK testing macros names: command not found
    

and idem for UpdateRequiredITKVersionInRemoteModules.sh.

Avoid the script continuing its execution if not all input parameters have
been provided.

  • Fix the git add command failing when not finding any file extension
    that matches the filters. This was causing that even files whose
    extension matched any of those before the missing one were not being
    added. Fixes:

    fatal: pathspec './*.c' did not match any files
    fatal: pathspec './*.rst' did not match any files
    

    Filters are now applied individually so that if one is not
    found/fails, the rest can still be added. Also, stdout and stderr
    are redirected to /dev/null to avoid excessive, additional
    verbosity.

  • Fix the commit message not being correctly processed: quotes within
    the script were missing (in addition to the quotes in the input
    argument so that the script considers it as a single argument).
    Fixes:

    error: pathspec 'Update' did not match any file(s) known to git.
    error: pathspec 'ITK' did not match any file(s) known to git.
    error: pathspec 'testing' did not match any file(s) known to git.
    error: pathspec 'macros' did not match any file(s) known to git.
    error: pathspec 'names' did not match any file(s) known to git.
    
  • Fix the ITK-build directory not being removed for being non empty.
    Fixes:

    rm: cannot remove '../../../ITK-build': Directory not empty
    

PR Checklist

Refer to the ITK Software Guide for
further development details if necessary.

Fix remotes maintenance scripts:
- Fix scripts input arguments `command not found` error adding the `test`
  command over each argument.Fixes:
  ```
  ./Utilities/Maintenance/ApplyScriptToRemotes.sh: line 82:
  UpdateTestingMacrosNames: command not found
  ./Utilities/Maintenance/ApplyScriptToRemotes.sh: line 82: ENH: Update
  ITK testing macros names: command not found
  ```

and idem for `UpdateRequiredITKVersionInRemoteModules.sh`.

Avoid the script continuing its execution if not all input parameters have
been provided.

- Fix the `git add` command failing when not finding any file extension
  that matches the filters. This was causing that even files whose
  extension matched any of those before the missing one were not being
  added. Fixes:
  ```
  fatal: pathspec './*.c' did not match any files
  fatal: pathspec './*.rst' did not match any files
  ```
  Filters are now applied individually so that if one is not
  found/fails, the rest can still be added. Also, `stdout` and `stderr`
  are redirected to `/dev/null` to avoid excessive, additional
  verbosity.

- Fix the commit message not being correctly processed: quotes within
  the script were missing (in addition to the quotes in the input
  argument so that the script considers it as a single argument).
  Fixes:
  ```
  error: pathspec 'Update' did not match any file(s) known to git.
  error: pathspec 'ITK' did not match any file(s) known to git.
  error: pathspec 'testing' did not match any file(s) known to git.
  error: pathspec 'macros' did not match any file(s) known to git.
  error: pathspec 'names' did not match any file(s) known to git.
  ```

- Fix the `ITK-build` directory not being removed for being non empty.
  Fixes:
  ```
  rm: cannot remove '../../../ITK-build': Directory not empty
  ```
@jhlegarreta jhlegarreta added type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots area:Remotes Issues affecting the Remote module labels Jun 14, 2019
@jhlegarreta
Copy link
Copy Markdown
Member Author

Related to the remote module update effort required by #999 .

@jhlegarreta
Copy link
Copy Markdown
Member Author

#1024 and #1025 are also related.

@dzenanz dzenanz merged commit 06f3d95 into InsightSoftwareConsortium:master Jun 17, 2019
@jhlegarreta jhlegarreta deleted the FixRemotesMaintenanceScripts branch June 17, 2019 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Remotes Issues affecting the Remote module type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants