setchi / FancyScrollView

[Unity] Scroll view component that can implement highly flexible animations.
https://setchi.jp/FancyScrollView/
MIT License
3.04k stars 385 forks source link

RFC: port package.json, license file back to master branch #41

Closed favoyang closed 4 years ago

favoyang commented 4 years ago

Hi @setchi,

Thanks for creating the awesome upm package. I noticed that you contribute the package to OpenUPM list, but it's fail on the build pipeline.

The reason is that the build pipelines will checkout each valid semver git tags, and build package from there. For this project, only the upm branch contains the package.json and other necessary upm files (licenses...). As a result, the package can be only installed via git url.

Here's the suggestion to fix the issue with better folder strucutre (also make it more consistent between different branches).

  1. port package.json and other necessary files back to master Assets/FancyScrollView/
  2. consider to move the Assets/FancyScrollView/ to Packages/jp.setchi.fancyscrollview to it a local package. So you always test your library as a package in the unity project.
  3. optional you can move Example folder to Samples~ and update the package.json. see https://forum.unity.com/threads/samples-in-packages-manual-setup.623080/, it will be shown in the package manager ui window.

Here's the steps for further releases

  1. bump version in package.json and commit.
  2. git subtree Packages/jp.setchi.fancyscrollview to the upm branch.
  3. push changes.
  4. go to github releases page, create new release (tag) from upm branch and name as vx.y.z to match the version number from package.json.

(openupm will detect the changes, and publish new version).

Hope this help.

favoyang commented 4 years ago

Here's an example repo - https://github.com/mob-sakai/UpmGitExtension/tree/master

The master branch Packages/com.coffee.upm-git-extension is the main package folder, however all the releases i.e. v1.0.1 are based on upm branch.

setchi commented 4 years ago

@favoyang Thanks for your advice! The build pipeline job was succeeded. Later I will try to configure it using the git subtree.

Screen Shot 2019-12-20 at 22 22 03
favoyang commented 4 years ago

Looks great. I have documented the related information in docs - https://beta.openupm.com/docs/adding-upm-package.html#handling-different-folder-structures