Skip to content

Commit

Permalink
Added make build command
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrinivas8687 committed Mar 14, 2023
1 parent 27ec443 commit b2432e9
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 25 deletions.
20 changes: 11 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
- package-ecosystem: docker
directory: /
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/"
interval: weekly

- package-ecosystem: gomod
directory: /
schedule:
interval: "daily"
interval: daily
28 changes: 14 additions & 14 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ jobs:
strategy:
fail-fast: false
matrix:
languages:
languages:
- go

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.languages }}
queries: security-extended,security-and-quality
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.languages }}
queries: security-extended,security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: /language:${{ matrix.languages }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: /language:${{ matrix.languages }}
3 changes: 2 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
platforms:
platforms:
- linux/amd64
- linux/arm64

Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DEFAULT_GOAL := default
PACKAGES := $(shell go list ./...)
VERSION := $(shell git describe --tags | sed 's/^v//' | rev | cut -d - -f 2- | rev)
COMMIT := $(shell git log -1 --format='%H')
Expand All @@ -14,14 +15,22 @@ LD_FLAGS := -s -w \
benchmark:
@go test -mod=readonly -v -bench= ${PACKAGES}

.PHONY: build
build:
go build -mod=readonly -tags="${BUILD_TAGS}" -ldflags="${LD_FLAGS}" \
-o ./bin/sentinelnode main.go

.PHONY: clean
clean:
rm -rf ./bin ./vendor

.PHONE: default
default: clean build

.PHONY: install
install:
go build -mod=readonly -tags="${BUILD_TAGS}" -ldflags="${LD_FLAGS}" \
-o ${GOPATH}/bin/sentinelnode main.go
-o "${GOPATH}/bin/sentinelnode" main.go

.PHONY: build-image
build-image:
Expand Down

0 comments on commit b2432e9

Please sign in to comment.