Code Monkey home page Code Monkey logo

Comments (10)

zhongfly avatar zhongfly commented on May 12, 2024

不清楚别的app怎么实现的,但是release可以读github提供的xml https://github.com/niuhuan/pikapi-flutter/releases.atom
另外github的api应该也有这方面的

from pikapika.

zhongfly avatar zhongfly commented on May 12, 2024

github rest api
最新release:https://docs.github.com/en/rest/reference/repos#get-the-latest-release
全部release:https://docs.github.com/en/rest/reference/repos#list-releases

from pikapika.

Z-fly avatar Z-fly commented on May 12, 2024

github在大陆基本接近彻底封杀
建议使用代理 https://ghproxy.com/

from pikapika.

zhongfly avatar zhongfly commented on May 12, 2024

github在大陆基本接近彻底封杀 建议使用代理 https://ghproxy.com/

连github都打不开的也更新不了,不必管

from pikapika.

Z-fly avatar Z-fly commented on May 12, 2024

如果站在产品经理的角度看,应该是尽量满足大众的需求,**本身不挂代理也能看(换句话说大部分人也没有代理),通过代理地址更新软件也没有增加开发难度

from pikapika.

zhongfly avatar zhongfly commented on May 12, 2024

如果站在产品经理的角度看,应该是尽量满足大众的需求,**本身不挂代理也能看(换句话说大部分人也没有代理),通过代理地址更新软件也没有增加开发难度

你给出的网站并不能反代github的rest api(api.github.com),只是文件的反代罢了

from pikapika.

Z-fly avatar Z-fly commented on May 12, 2024

那你有什么好办法吗?

from pikapika.

zhongfly avatar zhongfly commented on May 12, 2024

那你有什么好办法吗?

本来这个项目就一直只在github分发,若是要简单的获取版本信息(本issue的重点也只是如何获取版本号,不涉及分发),配合release分发的情况下使用github的api是最佳选择之一,获取到的版本号是跟随release实时变化的。

次一级的方法是手动添加一个版本信息文件在仓库中,检查更新时下载它、读取,但问题在于需要每次都手动更新版本号,十分麻烦。
次一级的自动化方法是考虑利用github action,在每次版本发布时(github action可被tag或者commit触发),更新仓库中的版本信息文件。

综上,最简单的方法的确就是我之前提出通过github rest api获取版本信息最简单,最省事。

from pikapika.

niuhuan avatar niuhuan commented on May 12, 2024

就算从release获取,当前的apk也需要知道自己的版本号,似乎都需要手动

from pikapika.

zhongfly avatar zhongfly commented on May 12, 2024

就算从release获取,当前的apk也需要知道自己的版本号,似乎都需要手动

像android项目,一般是写在build.gradle里,但是检查版本号一般不会用这个文件,因为不方便读取。

你目前这个项目我不了解一般是在何处记录版本号
不是写在 https://github.com/niuhuan/pikapi-flutter/blob/master/pubspec.yaml#L18 里吗?
我目前从apk里得到的版本号就是这个(android和ios打包里版本号是必须的,所以项目里其实已经有版本号了),你可能需要考虑的是桌面端如何获得此处的版本号,是不是有对应的包可以做?这部分你是开发者啊,应该最了解啊,https://pub.dev/packages/package_info_plus 这个不知道是不是。
如果你写在方便解析的文件里可以考虑直接读取。

我的想法是,版本号是和git上的tag名称相同,更新版本时,改版本号,打tag,然后根据tag历史就可以知道版本历史。
正式版与测试版通过release与pre-release区分

from pikapika.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.