Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tag/Release compressed package does not contains submodules sources #70

Closed
victorsndvg opened this issue Oct 4, 2016 · 12 comments
Closed
Assignees

Comments

@victorsndvg
Copy link

victorsndvg commented Oct 4, 2016

Hi @szaghi ,

I've seen that when you create tags in Github, a .zip or .tgz file is created. This file does not contains the submodules sources, and finally the project will not compile! ...

This is not a FLAP issue ... but, as I usually do 😉 , I looked into your repositories and I discover that this is also happening with FLAP.

I've been googling but I don't find a solution to this problem. Do you know how I can solve this?

Thanks in advance!

@szaghi
Copy link
Owner

szaghi commented Oct 4, 2016

@victorsndvg

Dear Victor you are right, indeed I was searching some references just these days about this topic. I have used to prefix my release tag with v just because I was exploiting the automatic generation of archives by GitHub API. As you said, the archives do not contain the submodule data, but currently I am not aware on how to fix this (maybe a git hook). The alternative could be manually upload releases archives, but I am too lazy 😄

Let me some time for my nightly readings...

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@victorsndvg bad news... see this http://stackoverflow.com/questions/34719785/how-to-add-submodule-files-to-a-github-release

Probably we should go with our in-house script/git-hook... stay tuned.

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@victorsndvg

Travis CI could be (again) our great friend, see this https://docs.travis-ci.com/user/deployment/releases/

@victorsndvg
Copy link
Author

Thank you @szaghi !

As a start point, I'm going to upload a handmade compressed package and then I will try to read something about Travis CI

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@victorsndvg

I just setup a decent solution. I am now exploiting Travis CI automatic deploy for uploading (automatically for each release) a fully-appended release archive. For example the new release v1.1.3 has such a new archive.

The dirty solution is based on 2 modifications:

  • I add a bunch of rules to fobos for cleaning/creating a tar archive with all submodules inside, see the new fobos;
  • I add the Travis CI deploy setup to FLAP's .travis.yml config file, see the new Travis CI setup.

Pros

  • the deployment is automatic;
  • the archive, e.g. this, contains all data, submodules included;

Cons

  • I was not able to postfix the tag version to the archive name, e.g. I would like to have something like FLAP-v1.1.3.tar.gz rather the plain FLAP.tar.gz;
  • I was not able to disable the other automatically-created archives, i.e. this and other, that do not contain the submodules data.

Conclusions

For the moment, I am satisfied by this dirty solution, maybe we can setup a cleaver/clean fix. What do you think?

@zbeekman
Copy link
Contributor

zbeekman commented Oct 5, 2016

If you're using git archive to create archives, you can specify the output name (and also a prefix---i.e., inserting a top level directory in the Tarbell like FLAP-x.y.z/). You can get the tag name using git describe, assuming your checked out at the tag in question.

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@zbeekman Thanks!

Yes, I know git describe, and nope, I am not using git archive because to recursively archive all submodules is a PITA. I am exploiting Travis CI deploy: after I have done all Travis CI tests (coverage/deploy doc), I go to deploy a new asset as the main archive release containing all necessary data (done by means of FoBiS executed into the Travis CI fresh cloned repo). My problem is to expand the tag version into the Travis environment.

@zbeekman
Copy link
Contributor

zbeekman commented Oct 5, 2016

I'm not sure what you mean "expand the tag version". I think you should be able to use git describe on Travis, and if not, then there's also the Travis environment variable, $TRAVIS_TAG

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@zbeekman I meant, I was not aware of $TAVIS_TAG that was the env I was searching for 🎉 🎉 Great Zaak!

To expand the reply: yes, I was using git describe on Travis for example into a script, but I was not sure how to expand => put into a .travis.yml global variable the result of git describe.

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@zbeekman works perfectly... FLAP-v1.1.5.tar.gz, thank you!

@victorsndvg
Copy link
Author

Great @szaghi and @zbeekman !

Problem fixed in an elegant way (as always).

I think that I can close this issue.

Thanks for your help!

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@victorsndvg tomorrow I'll modify the logic: it could be nice to have the install script as a separate asset that can be dowload alongside the whole release archive... just a minimal amend to travis setup

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants