Last active
October 3, 2016 02:46
-
-
Save tbrowder/a8e416a349d278a8800abf606d6ceb7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem: | |
======= | |
A Perl 6 module (Net::B) under development (in a local clone of your | |
Github repo) needs another Perl 6 module (Net::A) under development, | |
and neither module is in the Perl 6 ecosystem. | |
Given: | |
===== | |
Module Net::B's META6.json proper "depends" value with all dependencies: | |
"depends" :[ | |
"Digest::MD5", | |
"Getopt::Std", | |
"Net::A" | |
] | |
Solution: | |
======== | |
1. Modify module Net::B's META6.json to remove the dependency on Net::A | |
(put it back in only AFTER Net::A has been accepted into the Perl 6 ecosystem). | |
Now Net::B's META6.json "depends" value looks like this: | |
"depends" : [ | |
"Digest::MD5", | |
"Getopt::Std" | |
] | |
2. Create a shell script named, say, "install-net-a.sh", containing these lines: | |
#!/bin/sh | |
git clone https://github.com/joecoolauthor/Net-A.git | |
cd Net-A | |
# the following two lines are for added info in the travis build log" | |
TD=`pwd` | |
echo "=== now working in dir '$TD' ===" | |
# the coup de grace: | |
panda install . | |
3. Make the script executable: | |
$ chmod +x install-net-a.sh | |
4. Add the script to the local repo: | |
$ git add install-net-a.sh | |
5. Ensure your local clone of the Net::B module tests okay. | |
6. Commit staged changes: | |
$ git -a -m"updates required for travis build of local deps" | |
7. Push it to your Github Net::B repo | |
$ git push | |
Results | |
======= | |
Your next travis build should use the Net::A module okay (assuming no other | |
problems) and pass checks successfully. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are many less convoluted ways of doing this
class Build { method build($dir) { run 'zef', 'install', "$url-to-some-module"; }
zef install /path/to/Net/A /path/to/Net/B
zef install $url-to-net-a /path/to/Net/B
etc