Unverified Commit 6b7fbe4c authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

manage detached HEAD state for ci/cd

parent ece72a80
Loading
Loading
Loading
Loading
Loading
+18 −14
Original line number Diff line number Diff line
@@ -500,6 +500,10 @@ class SAREFPipeline:
                project.versions = [working_directory_version]
                return working_directory_version

            if project.repo.head.is_detached:
                # Extract the version from the ontology metadata
                working_directory_version = self.guess_version(project)
            else:
                # Else, try to extract the version from the branch name
                branch_name = project.repo.active_branch.name
                match = REGEX_BRANCH_NAME.match(branch_name)