openSUSE / obs-service-tar_scm

An OBS source service: fetches code from any SCM and archives it
GNU General Public License v2.0
31 stars 105 forks source link

project top level has a directory with the same name as the branch, the pull will fail. #480

Open shenghuang147 opened 11 months ago

shenghuang147 commented 11 months ago

my obs-service-obs_scm version: 0.10.30

obs_scm If the project top level has a directory with the same name as the branch, the pull will fail.

Here's my _service.

<services>
  <service name="obs_scm">
    <param name="scm">git</param>
    <param name="url">https://github.com/XTLS/Xray-core.git</param>
    <param name="revision">main</param>
    <param name="versionformat">@PARENT_TAG@+git.%h</param>
    <param name="versionrewrite-pattern">v(. *)</param>
    <param name="changesgenerate">disable</param>
  </service
  <service mode="buildtime" name="tar" />
  <service mode="buildtime" name="recompress">
    <param name="file">*.tar</param
    <param name="compression">gz</param>
  </service
  <service mode="buildtime" name="set_version" />
</services

For example, the project Xray-core contains a main directory with the same name as the branch.

image-20230808163256497

I forked the project and renamed the main directory and it pulled up fine.

image-20230808164737322

Currently I can only pull using <param name="revision">origin/main</param>.