diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index c315fdb148..0e28ece8a6 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -88,6 +88,7 @@ jobs: version: "latest-everything" - name: Set Git default branch from nextflow.config and set git default branch to that or "master" + run: | cd nf-core/${{ matrix.pipeline }} defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) @@ -95,6 +96,7 @@ jobs: defaultBranch="master" fi echo "Default branch: $defaultBranch" + echo "defaultBranch=$defaultBranch" >> GITHUB_OUTPUT git config --global init.defaultBranch $defaultBranch - name: Run synchronisation @@ -104,7 +106,9 @@ jobs: run: | git config --global user.email "core@nf-co.re" git config --global user.name "nf-core-bot" - nf-core --log-file sync_log_${{ matrix.pipeline }}.txt pipelines sync -d nf-core/${{ matrix.pipeline }} \ + nf-core --log-file sync_log_${{ matrix.pipeline }}.txt + ${{ github.event.inputs.debug == 'true' && '--verbose' || '' }} + pipelines sync -d nf-core/${{ matrix.pipeline }} \ --from-branch dev \ --pull-request \ --username nf-core-bot \ diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index ae5bea57d5..0e2c683e6f 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -298,7 +298,6 @@ def render_template(self) -> None: template_dir = Path(nf_core.__file__).parent / "pipeline-template" object_attrs = self.jinja_params object_attrs["nf_core_version"] = nf_core.__version__ - # Can't use glob.glob() as need recursive hidden dotfiles - https://stackoverflow.com/a/58126417/713980 template_files = list(Path(template_dir).glob("**/*")) template_files += list(Path(template_dir).glob("*")) @@ -433,6 +432,7 @@ def get_default_branch(self) -> None: self.default_branch = ( str(git.config.GitConfigParser().get_value("init", "defaultBranch")) or "master" ) # default to master + log.debug(f"Default branch name: {self.default_branch}") except configparser.Error: log.debug("Could not read init.defaultBranch") if self.default_branch in ["dev", "TEMPLATE"]: