Using GitHub via a browser, I am failing to create the Releases assets source code zip and tar.gz files that contain my src/filename.php files.
Syncing to Packagist appears to work OK, but Composer then not unexpectedly fails to load my source files into the usual vendor/packagename/src/ subdirectory.
I have tried loading the source files themselves into the main part of the repository into subdirectory /src using Add file. I have also added a zipped and a tarballed version into Releases file upload.
GitHub documentation is somewhat light on this, so could someone kindly explain exactly what I am doing wrong.
My finger trouble somewhere...
I was indeed incrementing the tag version, but it seems as if the php code additions I did to the main branch (with file upload) had for some unfathomable reason be made AFTER the new tag (release). Packagist then synched to the new tagged version but this was obviously missing the code additions.
My remedy was simply to methodically update the code again, check the json for tag version, and then finally release with an incremented tag.
Incidentally, there was no error message - just a total absence of php modules in my myvendor/mypackagename/src !
Related
On Github repository I have one file ("changelog.txt") and one folder ("source") containing, as the name suggests, the source code of the zipped executable (the program). See Github Repository.
However, when I go to the release page - see Github Release - I can download the zipped executable, but when I try to download the source code - see Source Code (zip) - there is only "changelog.txt", and the entire "source" folder (containing the actual code) is missing.
I understand that Github's "Source Code (zip)" is auto-generated based on the content of the repository, so I deleted the old release, and created a new one + re-uploaded the zipped executable, but it doesn't seem to work and I still have only "changelog.txt" when I try to download the source.
It's not the end of the world since the source code is still accessible from the repository (see the first link), but such a problem could potentially annoy the people who would like to download the source from the release page.
Is there a solution ? Or did I do something the wrong way ?
Thanks for your answers, and sorry for my bad English (it is not my native tongue).
I am new to Github. I downloaded the PHPWord (link below) on Github, but some how the folders: samples, tests, docs are missing. It only has the folder "src/PhpWord".
https://github.com/PHPOffice/PHPWord
I also use composer require phpoffice/phpword and the result is the same (missing folders)
Am I doing something wrong or there is another way to download which will include the other folders: samples, tests, docs.
Thanks in advance,
The reason the other folders are missing may be due to you downloaded the Zip file and not a clone to your PC which downloads everything including the source code.
The Zip download only contains one file folder to the program. I suspect this is the finished product rather than the development product your seeing in the GitHub repository. Although, usually the author of the program includes this in the instructions which I didn't see when reading them.
You may also want to re-read the instructions on the REAME.md document in the repository. There are some requirements that need to be preformed before using composer to install the dependencies. It may account for the "missing folders" message
I know there are other questions on here about this issue, but this case is different because it's not caused by an empty repo folder or anything, and I've been pushing changes to this same repo using GitHub desktop for some time. After I type my changes into the summary window, I hit Commit to Master (branch is already set to master, like always). But I get the unborn head issue, along with the alert that my repo's name is too long. Again, this has never happened, and the name has never been an issue previously. Here's a screenshot for reference:
Does anyone know what might be causing this?
The error is due to a file in "Desktop/MY REPOS/The-Tech-Academy-C-Sharp-Coding-Projects/AppData/Local/Microsoft/VisualStudio/15.0_8067392e/VTC/" having a name that is too long. The filename looks like it is generated by a tool, not written by you. In fact it looks like the whole "Desktop/MY REPOS/The-Tech-Academy-C-Sharp-Coding-Projects/AppData/Local/Microsoft/" directory is probably not code that you are working on yourself.
With version control, it is best to ignore any files and folders that are generated somehow, such as this "Microsoft" folder. With git, you can do that in your .gitignore file with the following line, assuming that "Desktop/MY REPOS/The-Tech-Academy-C-Sharp-Coding-Projects/" is your project root:
AppData/Local/Microsoft
In fact, if "AppData" contains only generated files, then you can even ignore just that.
I was using Sublime Text ver 3.2.1 working on a fresh copy of laravel in wamp. I had this issue of 'cannot publish unborn head' when using GitHub Desktop to publish for the first time. Solved by typing something in the title under Summary. As an aside, I included .editorconfig in my gitignore file.
I have details of few public repositories on GitHub. Is there a way to write a script which downloads the source code of all those repositories on to my local machine? While downloading the source code I want all the previous versions of project to be downloaded.
Ex: Project RxJava has about 124 releases as shown here. I want to know if there is a way to write a program which downloads source code of all these 124 releases on to my machine. I don't want to click on download source code button on each of these releases.
The easiest is to:
clone the repo (that will give you the sources matching each tags)
do a git tag and for each tag, curl the release.
Actually, since the release is the source code, you don't have to curl anything.
To access the source code of a "release", simply checkout the tag matching the release.
cd /path/to/cloned/repo
git checkout 1.0.8
This is how I figured the solution:
Using the Repository Search API get the details of required the projects.
This gives you a JSON object which has the below property
"releases_url": "https://api.github.com/repos/ReactiveX/RxJava/releases",
Use the above url to get a JSON object which describes release details of project
The JSON obtained in step 3 has a property as given below for each version of project
"zipball_url": "https://api.github.com/repos/ReactiveX/RxJava/zipball/v1.0.8",
Now copy the content from above URL in to an output stream to fetch the required source code.
Sample source code is available here
I know I am seven years late, yet I think this solution might help people with the same prolem:
I developed a simple bash script that you can find in this GitHub Gist that allows you to download all versions from every file currently in the repository. The output data is located in subfolders matching the name of the file, containing all its versions. The original directory tree of the repository is kept.
Hope anyone finds this useful!
I am working inside a private repository, and collaborate with my friend, who are not very friendly with SCM and stuff. All he need is to monitor the latest release from my development, which is 1 single executable file.
I was wondering instead of cloning the whole repo each time he want to get the latest changes (sometimes my changeset can consists of several large binary files that only being used upon development, not testing). Can I bind the executable file into the Download section in BitBucket?. So that everytime I build my project, the executable file will appear in the Download section and he can download it right away.
For now all I can see from Bitbucket's download section is just the manual upload and Tag/Snapshot download, which I presume will pack a certain changesets into a compressed file. Is there any chance I can do this?.
Thanks.
If your executable file is checked into the repository, you can link to it at a specific revision:
https://staging.bitbucket.org/<username>/<repo>/raw/<revision>/file.exe
For example, this link will always give you the latest stable hg(1) man page from the Mercurial repository:
https://bitbucket.org/mirror/mercurial/raw/stable/doc/hg.1.txt
This would give you latest README on the default branch from the Django repository:
https://bitbucket.org/django/django/raw/default/README
If your executable isn't checked into the repository (some prefer not to check in build artifacts), you'll need to manually upload them in the downloads section of your repository. There isn't a REST API for creating project downloads at the moment.
Would giving your friend an archive of the tip work? Try this URL:
https://bitbucket.org/<username>/<project>/get/tip.tar.gz
#Idan's suggestion might already work for you, but if the archive is too big, you could set up an extra repository for binaries which automatically gets updated, committed and pushed by your build process. Then your fellow developer could download a comparatively small tip archive as suggested by Idan.
In addition to Idan's answer:
To fetch the latest version from the 'default' branch:
https://bitbucket.org/<username>/<project>/get/default.tar.gz
You can replace 'default' by any other branch name, tag name or changeset (if you know it).