Add source/dist reference information to package
parent
00a4fe2a14
commit
f48634d074
|
@ -65,6 +65,7 @@ class ArrayLoader
|
||||||
}
|
}
|
||||||
$package->setSourceType($config['source']['type']);
|
$package->setSourceType($config['source']['type']);
|
||||||
$package->setSourceUrl($config['source']['url']);
|
$package->setSourceUrl($config['source']['url']);
|
||||||
|
$package->setSourceReference($config['source']['reference']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($config['dist'])) {
|
if (isset($config['dist'])) {
|
||||||
|
@ -79,6 +80,7 @@ class ArrayLoader
|
||||||
}
|
}
|
||||||
$package->setDistType($config['dist']['type']);
|
$package->setDistType($config['dist']['type']);
|
||||||
$package->setDistUrl($config['dist']['url']);
|
$package->setDistUrl($config['dist']['url']);
|
||||||
|
$package->setDistReference($config['dist']['reference']);
|
||||||
$package->setDistSha1Checksum($config['dist']['shasum']);
|
$package->setDistSha1Checksum($config['dist']['shasum']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,10 @@ class MemoryPackage extends BasePackage
|
||||||
protected $installationSource;
|
protected $installationSource;
|
||||||
protected $sourceType;
|
protected $sourceType;
|
||||||
protected $sourceUrl;
|
protected $sourceUrl;
|
||||||
|
protected $sourceReference;
|
||||||
protected $distType;
|
protected $distType;
|
||||||
protected $distUrl;
|
protected $distUrl;
|
||||||
|
protected $distReference;
|
||||||
protected $distSha1Checksum;
|
protected $distSha1Checksum;
|
||||||
protected $releaseType;
|
protected $releaseType;
|
||||||
protected $version;
|
protected $version;
|
||||||
|
@ -133,6 +135,22 @@ class MemoryPackage extends BasePackage
|
||||||
return $this->sourceUrl;
|
return $this->sourceUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $reference
|
||||||
|
*/
|
||||||
|
public function setSourceReference($reference)
|
||||||
|
{
|
||||||
|
$this->sourceReference = $reference;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function getSourceReference()
|
||||||
|
{
|
||||||
|
return $this->sourceReference;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $type
|
* @param string $type
|
||||||
*/
|
*/
|
||||||
|
@ -165,6 +183,22 @@ class MemoryPackage extends BasePackage
|
||||||
return $this->distUrl;
|
return $this->distUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $reference
|
||||||
|
*/
|
||||||
|
public function setDistReference($reference)
|
||||||
|
{
|
||||||
|
$this->distReference = $reference;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function getDistReference()
|
||||||
|
{
|
||||||
|
return $this->distReference;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -110,6 +110,13 @@ interface PackageInterface
|
||||||
*/
|
*/
|
||||||
function getSourceUrl();
|
function getSourceUrl();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the repository reference of this package, e.g. master, 1.0.0 or a commit hash for git
|
||||||
|
*
|
||||||
|
* @return string The repository reference
|
||||||
|
*/
|
||||||
|
function getSourceReference();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type of the distribution archive of this version, e.g. zip, tarball
|
* Returns the type of the distribution archive of this version, e.g. zip, tarball
|
||||||
*
|
*
|
||||||
|
@ -124,6 +131,13 @@ interface PackageInterface
|
||||||
*/
|
*/
|
||||||
function getDistUrl();
|
function getDistUrl();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the reference of the distribution archive of this version, e.g. master, 1.0.0 or a commit hash for git
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function getDistReference();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the sha1 checksum for the distribution archive of this version
|
* Returns the sha1 checksum for the distribution archive of this version
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue