Skip to content

Commit

Permalink
build: use PHP for release-docker script
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker committed Oct 28, 2017
1 parent b86d6c9 commit 9e551a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"commitmsg": "validate-commit-msg",
"semantic-release": "semantic-release pre && ./release-docker.sh && semantic-release post"
"semantic-release": "semantic-release pre && php release-docker.php && semantic-release post"
},
"devDependencies": {
"cz-conventional-changelog": "^2.0.0",
Expand Down
10 changes: 10 additions & 0 deletions release-docker.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

$dockerEmail = getenv('DOCKER_EMAIL');
$dockerUsername = getenv('DOCKER_USERNAME');
$dockerPassword = getenv('DOCKER_PASSWORD');
$version = json_decode(file_get_contents(__DIR__ . '/package.json'))->version;

system("docker login -e=$dockerEmail -u=$dockerEmail -p=$dockerPassword");

This comment has been minimized.

Copy link
@staabm

staabm Oct 28, 2017

Contributor

Typo: email -> username

This comment has been minimized.

Copy link
@felixfbecker

felixfbecker Oct 28, 2017

Author Owner

nice catch

system("docker build -t felixfbecker/php-language-server:$version .");
system("docker push felixfbecker/php-language-server:$version");
6 changes: 0 additions & 6 deletions release-docker.sh

This file was deleted.

0 comments on commit 9e551a3

Please sign in to comment.