Skip to content

Instantly share code, notes, and snippets.

@tbrowder
Last active October 3, 2016 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbrowder/a8e416a349d278a8800abf606d6ceb7b to your computer and use it in GitHub Desktop.
Save tbrowder/a8e416a349d278a8800abf606d6ceb7b to your computer and use it in GitHub Desktop.
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.
@ugexe
Copy link

ugexe commented Oct 3, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment