Skip to content
Snippets Groups Projects
Commit 54f2a129 authored by Tibo's avatar Tibo
Browse files

Release new version + manifest

parent 87d1c703
No related branches found
No related tags found
No related merge requests found
No preview for this file type
[
{
"name": "monitor.phar",
"sha1": "{{sha1}}",
"url": "https://gitlab.cylab.be/cylab/monitoring/blob/master/php-client/release/monitor-{{version}}.phar",
"version": "{{version}}"
}
]
[
{
"name": "monitor.phar",
"sha1": "c60f1588d249716f3410c2f35b5e13d294b0b0f8",
"url": "https://gitlab.cylab.be/cylab/monitoring/blob/master/php-client/release/monitor-20180803.161013.phar",
"version": "20180803.161013"
}
]
File added
#!/usr/bin/env php
<?php
$date = date("Ymd.His");
file_put_contents(__DIR__ . "/../version", $date);
exec(__DIR__ . "/../vendor/bin/box build");
file_put_contents(__DIR__ . "/../version", "@dev");
$source = __DIR__ . "/../bin/monitor.phar";
$sha1 = sha1(file_get_contents($source));
$target = __DIR__ . "/../release/monitor-$date.phar";
$manifest = file_get_contents("manifest.json.tmpl");
$manifest = str_replace("{{version}}", $date, $manifest);
$manifest = str_replace("{{sha1}}", $sha1, $manifest);
file_put_contents(__DIR__ . "/../release/manifest.json", $manifest);
copy($source, $target);
#!/bin/sh
DATE=`date '+%Y%m%d.%H%M%S'`
echo $DATE > version
./vendor/bin/box build
echo "@dev" > version
@dev
@dev
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment