Skip to content

Commit

Permalink
moved main
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Jul 19, 2023
1 parent 348e4e6 commit c47570e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ BUILD_FLAGS = "`[[ -z "$(STATIC)" ]] && echo "" || echo "-extldflags=-static"` -

.PHONY: revad
revad:
go build -ldflags $(BUILD_FLAGS) -o ./cmd/revad/revad ./cmd/revad
go build -ldflags $(BUILD_FLAGS) -o ./cmd/revad/revad ./cmd/revad/main

.PHONY: revad-ceph
revad-ceph:
go build -ldflags $(BUILD_FLAGS) -tags ceph -o ./cmd/revad/revad ./cmd/revad
go build -ldflags $(BUILD_FLAGS) -tags ceph -o ./cmd/revad/revad ./cmd/revad/main

.PHONY: reva
reva:
Expand Down
4 changes: 2 additions & 2 deletions cmd/revad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

package main
package revadcmd

import (
"flag"
Expand Down Expand Up @@ -55,7 +55,7 @@ var (
revaProcs []*runtime.Reva
)

func main() {
func Main() {
flag.Parse()

// initialize the global system information
Expand Down
25 changes: 25 additions & 0 deletions cmd/revad/main/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2018-2023 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// In applying this license, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

package main

import revadcmd "github.com/cs3org/reva/cmd/revad"

func main() {
revadcmd.Main()
}
2 changes: 1 addition & 1 deletion docker/Dockerfile.revad
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV CGO_ENABLED 1

RUN apk add --no-cache gcc musl-dev

RUN go build -ldflags "-X main.gitCommit=$GIT_COMMIT -X main.version=$VERSION -X main.goVersion=`go version | awk '{print $3}'` -X main.buildDate=`date +%FT%T%z`" -o ./cmd/revad/revad ./cmd/revad
RUN go build -ldflags "-X main.gitCommit=$GIT_COMMIT -X main.version=$VERSION -X main.goVersion=`go version | awk '{print $3}'` -X main.buildDate=`date +%FT%T%z`" -o ./cmd/revad/revad ./cmd/revad/main

FROM alpine:3.16

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.revad-eos
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV CGO_ENABLED 1

RUN apk add --no-cache gcc musl-dev

RUN go build -ldflags "-X main.gitCommit=$GIT_COMMIT -X main.version=$VERSION -X main.goVersion=`go version | awk '{print $3}'` -X main.buildDate=`date +%FT%T%z`" -o ./cmd/revad/revad ./cmd/revad
RUN go build -ldflags "-X main.gitCommit=$GIT_COMMIT -X main.version=$VERSION -X main.goVersion=`go version | awk '{print $3}'` -X main.buildDate=`date +%FT%T%z`" -o ./cmd/revad/revad ./cmd/revad/main

FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.91

Expand Down

0 comments on commit c47570e

Please sign in to comment.