Skip to content

Commit

Permalink
Merge pull request #360 from jolicode/fix-watcher
Browse files Browse the repository at this point in the history
Fix watcher binary name for Linux
  • Loading branch information
pyrech committed Apr 2, 2024
2 parents 15dec64 + fbcceca commit f72d47f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tools/phar/box.linux-amd64.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"base-path": "../../",
"files-bin": [
"tools/watcher/bin/watcher-linux"
"tools/watcher/bin/watcher-linux-amd64"
],
"blacklist": [
"castor",
Expand Down
2 changes: 1 addition & 1 deletion tools/phar/box.windows-amd64.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"base-path": "../../",
"files-bin": [
"tools/watcher/bin/watcher-linux",
"tools/watcher/bin/watcher-linux-amd64",
"tools/watcher/bin/watcher-windows.exe"
],
"finder-bin": [
Expand Down
10 changes: 5 additions & 5 deletions tools/phar/castor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
#[AsTask(description: 'Build phar for Linux system')]
function linux()
{
compile(fn () => run('vendor/bin/box compile -c box.linux-amd64.json', path: __DIR__));
compile(fn () => run('vendor/bin/box compile -c box.linux-arm64.json', path: __DIR__));
compile(fn () => run('vendor/bin/box compile -c box.linux-amd64.json', workingDirectory: __DIR__));
compile(fn () => run('vendor/bin/box compile -c box.linux-arm64.json', workingDirectory: __DIR__));
}

#[AsTask(description: 'Build phar for MacOS system')]
function darwin()
{
compile(fn () => run('vendor/bin/box compile -c box.darwin-amd64.json', path: __DIR__));
compile(fn () => run('vendor/bin/box compile -c box.darwin-arm64.json', path: __DIR__));
compile(fn () => run('vendor/bin/box compile -c box.darwin-amd64.json', workingDirectory: __DIR__));
compile(fn () => run('vendor/bin/box compile -c box.darwin-arm64.json', workingDirectory: __DIR__));
}

#[AsTask(description: 'Build phar for Windows system')]
function windows()
{
compile(fn () => run('vendor/bin/box compile -c box.windows-amd64.json', path: __DIR__));
compile(fn () => run('vendor/bin/box compile -c box.windows-amd64.json', workingDirectory: __DIR__));
}

#[AsTask(description: 'Build phar for all systems')]
Expand Down
Binary file removed tools/watcher/bin/watcher-linux
Binary file not shown.
Binary file added tools/watcher/bin/watcher-linux-amd64
Binary file not shown.
Binary file modified tools/watcher/bin/watcher-linux-arm64
Binary file not shown.
14 changes: 7 additions & 7 deletions tools/watcher/castor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
#[AsTask(description: 'Build watcher for Linux system')]
function linux()
{
run('go build -o bin/watcher-linux -ldflags="-s -w" main.go', environment: ['GOOS' => 'linux', 'CGO_ENABLED' => '0'], path: __DIR__);
run('upx --brute bin/watcher-linux', path: __DIR__);
run('go build -o bin/watcher-linux-amd64 -ldflags="-s -w" main.go', environment: ['GOOS' => 'linux', 'GOARCH' => 'amd64', 'CGO_ENABLED' => '0'], workingDirectory: __DIR__);
run('upx --brute bin/watcher-linux-amd64', workingDirectory: __DIR__);

run('go build -o bin/watcher-linux-arm64 -ldflags="-s -w" main.go', environment: ['GOOS' => 'linux', 'GOARCH' => 'arm64', 'CGO_ENABLED' => '0'], path: __DIR__);
run('upx --brute bin/watcher-linux-arm64', path: __DIR__);
run('go build -o bin/watcher-linux-arm64 -ldflags="-s -w" main.go', environment: ['GOOS' => 'linux', 'GOARCH' => 'arm64', 'CGO_ENABLED' => '0'], workingDirectory: __DIR__);
run('upx --brute bin/watcher-linux-arm64', workingDirectory: __DIR__);
}

#[AsTask(description: 'Build watcher for MacOS system')]
function darwin()
{
run('go build -o bin/watcher-darwin-amd64 -ldflags="-s -w" main.go', environment: ['GOOS' => 'darwin', 'GOARCH' => 'amd64', 'CGO_ENABLED' => '0'], path: __DIR__);
run('go build -o bin/watcher-darwin-arm64 -ldflags="-s -w" main.go', environment: ['GOOS' => 'darwin', 'GOARCH' => 'arm64', 'CGO_ENABLED' => '0'], path: __DIR__);
run('go build -o bin/watcher-darwin-amd64 -ldflags="-s -w" main.go', environment: ['GOOS' => 'darwin', 'GOARCH' => 'amd64', 'CGO_ENABLED' => '0'], workingDirectory: __DIR__);
run('go build -o bin/watcher-darwin-arm64 -ldflags="-s -w" main.go', environment: ['GOOS' => 'darwin', 'GOARCH' => 'arm64', 'CGO_ENABLED' => '0'], workingDirectory: __DIR__);
}

#[AsTask(description: 'Build watcher for Windows system')]
function windows()
{
run('go build -o bin/watcher-windows.exe -ldflags="-s -w" main.go', environment: ['GOOS' => 'windows', 'CGO_ENABLED' => '0'], path: __DIR__);
run('go build -o bin/watcher-windows.exe -ldflags="-s -w" main.go', environment: ['GOOS' => 'windows', 'CGO_ENABLED' => '0'], workingDirectory: __DIR__);
}

#[AsTask(description: 'Build watcher for all systems')]
Expand Down

0 comments on commit f72d47f

Please sign in to comment.