Coder Social home page Coder Social logo

Comments (14)

nxpfrankli avatar nxpfrankli commented on September 17, 2024

tar ball can't correct identify source version. github don't provide customer script to generate it. which is known issue

from mfgtools.

joerg-krause avatar joerg-krause commented on September 17, 2024

Why not define a version string in CMakeLists.txt, e.g. using the project() command, and use this version string if no git clone is used? This why, both the source tarball and the git clone will compile.

from mfgtools.

Floweynt avatar Floweynt commented on September 17, 2024

CMakeList.txt can't sync with git tag and commit hash automatically.
github don't support external script to generate tarball.

from mfgtools.

joerg-krause avatar joerg-krause commented on September 17, 2024

Maybe I was not clear enough. I've pushed an example to my fork which does apply a version string even when building the source tarball: https://github.com/joerg-krause/mfgtools/tree/gitversion.

from mfgtools.

nxpfrankli avatar nxpfrankli commented on September 17, 2024

If version upgrade 1.2.128, I have to change CMakeList.txt (project(uuu VERSION 1.2.91)).

from mfgtools.

joerg-krause avatar joerg-krause commented on September 17, 2024

Yes. Is it a no-go?

from mfgtools.

joerg-krause avatar joerg-krause commented on September 17, 2024

Another solution would be to add a travis rule to automatically publish a release tarball when tagging a commit. Something like this (totally untested!):

jobs:
  include:
    - stage: deploy
      if: tag IS present
      script: skip
      before_deploy:
        - .ci/make_version.sh $TRAVIS_TAG
      deploy:
        provider: releases
        api_key: $GITHUB_OAUTH_TOKEN
        file: mfgtools-$TRAVIS_TAG.tar.gz
        overwrite: true
        skip_cleanup: true
        on:
          tags: true

from mfgtools.

nxpfrankli avatar nxpfrankli commented on September 17, 2024

but in release page https://github.com/NXPmicro/mfgtools/releases,
source tar ball is generate by github, I am not sure how to replace it with generated by travis-ci

from mfgtools.

joerg-krause avatar joerg-krause commented on September 17, 2024

You're right, you cannot overwrite the github source tarball, but you can create your own one and upload it. I've tested it on my fork: https://github.com/joerg-krause/mfgtools. In releases you can see the created tarball uuu_1.2.92.tar.gz.

Note, I am not an expert in Travis. I've just re-used the code from some other project.
Note, this is just a test and I will remove the tarball later.

from mfgtools.

nxpfrankli avatar nxpfrankli commented on September 17, 2024

but Source code (zip) and Source code (tar.gz), which will cause confuse.

from mfgtools.

joerg-krause avatar joerg-krause commented on September 17, 2024

Maybe. However, the automatically generated source tarballs from github have some disadvantages:

  1. They can change at any point. The tarballs are generated and cached, once the cash is invalidated, a new tarball is generated by github. This new tarball will have a different checksum. This makes it difficult for package management systems as they rely on a valid checksum. An uploaded release tarball will not change (until you force it).
  2. They do not contain submodules.

from mfgtools.

Floweynt avatar Floweynt commented on September 17, 2024

but we can't prevent github to create it. So I don't prefer use tarball at all.

from mfgtools.

joerg-krause avatar joerg-krause commented on September 17, 2024

Note that the automatically generated source tarball does not even compile. In my opinion, that is confusing.

from mfgtools.

nxpfrankli avatar nxpfrankli commented on September 17, 2024

That's problem, we claim tarball is not supported before work out and good solution.

from mfgtools.

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.