summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--build-ce.sh48
-rw-r--r--cmd/rr-ce/LICENSE21
-rw-r--r--cmd/rr-ce/main.go70
-rw-r--r--cmd/rr/cmd/stop.go2
5 files changed, 2 insertions, 147 deletions
diff --git a/Makefile b/Makefile
index d96a21aa..43afb68d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,13 @@
all:
@./build.sh
- @./build-ce.sh
build:
@./build.sh all
-build-ce:
- @./build-ce.sh all
clean:
rm -rf rr
- rm -rf rr-ce
install: all
cp rr /usr/local/bin/rr
- cp rr-ce /usr/local/bin/rr-ce
-uninstall:
+uninstall:
rm -f /usr/local/bin/rr
- rm -f /usr/local/bin/rr-ce
test:
composer update
go test -v -race -cover
diff --git a/build-ce.sh b/build-ce.sh
deleted file mode 100644
index e7177199..00000000
--- a/build-ce.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-cd $(dirname "${BASH_SOURCE[0]}")
-OD="$(pwd)"
-
-# Pushes application version into the build information.
-RR_VERSION=1.4.2
-
-# Hardcode some values to the core package
-LDFLAGS="$LDFLAGS -X github.com/spiral/roadrunner/cmd/rr/cmd.Version=${RR_VERSION}"
-LDFLAGS="$LDFLAGS -X github.com/spiral/roadrunner/cmd/rr/cmd.BuildTime=$(date +%FT%T%z)"
-
-build(){
- echo Packaging $1 CE Build
- bdir=roadrunner-ce-${RR_VERSION}-$2-$3
- rm -rf builds/$bdir && mkdir -p builds/$bdir
- GOOS=$2 GOARCH=$3 ./build-ce.sh
-
- if [ "$2" == "windows" ]; then
- mv rr-ce builds/$bdir/rr-ce.exe
- else
- mv rr-ce builds/$bdir
- fi
-
- cp README.md builds/$bdir
- cp CHANGELOG.md builds/$bdir
- cp LICENSE builds/$bdir
- cd builds
-
- if [ "$2" == "linux" ]; then
- tar -zcf $bdir.tar.gz $bdir
- else
- zip -r -q $bdir.zip $bdir
- fi
-
- rm -rf $bdir
- cd ..
-}
-
-if [ "$1" == "all" ]; then
- rm -rf builds/*ce*
- build "Windows" "windows" "amd64"
- build "Mac" "darwin" "amd64"
- build "Linux" "linux" "amd64"
- build "FreeBSD" "freebsd" "amd64"
- exit
-fi
-
-CGO_ENABLED=0 go build -ldflags "$LDFLAGS -extldflags '-static'" -o "$OD/rr-ce" cmd/rr-ce/main.go
diff --git a/cmd/rr-ce/LICENSE b/cmd/rr-ce/LICENSE
deleted file mode 100644
index efb98c87..00000000
--- a/cmd/rr-ce/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2018 SpiralScout
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE. \ No newline at end of file
diff --git a/cmd/rr-ce/main.go b/cmd/rr-ce/main.go
deleted file mode 100644
index 4f13ff63..00000000
--- a/cmd/rr-ce/main.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// MIT License
-//
-// Copyright (c) 2018 SpiralScout
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-package main
-
-import (
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
- "github.com/spiral/roadrunner/service/limit"
-
- // services (plugins)
- "github.com/spiral/jobs"
- "github.com/spiral/php-grpc"
- "github.com/spiral/roadrunner/service/env"
- "github.com/spiral/roadrunner/service/http"
- "github.com/spiral/roadrunner/service/rpc"
- "github.com/spiral/roadrunner/service/static"
-
- // queue brokers
- "github.com/spiral/jobs/broker/amqp"
- "github.com/spiral/jobs/broker/beanstalk"
- "github.com/spiral/jobs/broker/ephemeral"
- "github.com/spiral/jobs/broker/sqs"
-
- // additional commands and debug handlers
- _ "github.com/spiral/jobs/cmd/rr-jobs/jobs"
- _ "github.com/spiral/php-grpc/cmd/rr-grpc/grpc"
- _ "github.com/spiral/roadrunner/cmd/rr/http"
- _ "github.com/spiral/roadrunner/cmd/rr/limit"
-)
-
-func main() {
- rr.Container.Register(env.ID, &env.Service{})
- rr.Container.Register(rpc.ID, &rpc.Service{})
- rr.Container.Register(http.ID, &http.Service{})
- rr.Container.Register(static.ID, &static.Service{})
- rr.Container.Register(grpc.ID, &grpc.Service{})
- rr.Container.Register(jobs.ID, &jobs.Service{
- Brokers: map[string]jobs.Broker{
- "amqp": &amqp.Broker{},
- "ephemeral": &ephemeral.Broker{},
- "beanstalk": &beanstalk.Broker{},
- "sqs": &sqs.Broker{},
- },
- })
-
- // supervisor
- rr.Container.Register(limit.ID, &limit.Service{})
-
- // you can register additional commands using cmd.CLI
- rr.Execute()
-}
diff --git a/cmd/rr/cmd/stop.go b/cmd/rr/cmd/stop.go
index 5c6ed2a5..8beee73e 100644
--- a/cmd/rr/cmd/stop.go
+++ b/cmd/rr/cmd/stop.go
@@ -43,7 +43,7 @@ func stopHandler(cmd *cobra.Command, args []string) error {
util.Printf("<green>Stopping RoadRunner</reset>: ")
var r string
- if err := client.Call("system.Detach", true, &r); err != nil {
+ if err := client.Call("system.Stop", true, &r); err != nil {
return err
}