composer / satis

Simple static Composer repository generator - For a full private Composer repo use Private Packagist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New tags are ignored

aario opened this issue · comments

commented

I added my library to satis.
I ran:

bin/satis build satis.json <my repo name>

I can see my library is added to the list of the repository with its release.
I tag a commit on my library repository.
I run the above command again. The new tag does not appear.
I deleted composer cache folder. Ran the command again. Nothing changed.
Every try takes around half an hour and at the end I see my new tag does not appear in list of releases. It's very time consuming and painful. Looking into output of satis command also doesn't help as there is absolutely no error or warning. Nothing. It just doesn't work. There is no way to figure out why when satis checks my repository cannot see the new tag there. No way.

commented

The problem was that the new release version had to be in places:

  • latest commit tag
  • inside composer.json as:
    "version": "2.8.10",
commented

So I had version in composer.json as 2.8.0
Then I had two tags as:

2.8.9
.
.
.
Other commits without tags
.
.
.
2.8.8

Satis was able to read 2.8.8 but not 2.8.9. So I modified composer.json to show version as 2.8.10 this time. Put a new tag on this commit as 2.8.10. Now Satis was able to read my latest tag.
Now satis shows me:

Releases: master, 2.8.8, 2.8.10

Still I cannot see 2.8.9. But that doesn't matter at this time.

commented

composer.json should not contain your version. Your tags with a composer.json that contains a different version than the tag will simply never work.

If you use the version info in composer.json, you are interfering with the tag version detection, Especially if the versions in the tag and the composer.json do not match. If you have a repository and can use tags, never never ever add version to composer.json. It only exists to allow for cases where you don't have a repository with tags.

The question remains why your 2.8.9 tag didn't work. Did you use the version inside composer.json before?

Hmm, I have the same problem, my packages have tags such as 1.0.0, but satis reports all of them dev-master or dev-main.
Could it be due to my use of paths?

  "repositories": [
        { "type": "path", "url": "/folder/to/my/repositories/*/*" }
    ],