-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor and CI #2
Open
obalunenko
wants to merge
16
commits into
eleby:main
Choose a base branch
from
obalunenko:develop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
04ad27e
chore(): Add gomod
obalunenko 8049962
chore(): Add gitignore
obalunenko dc80425
chore(): Add linter config
obalunenko 73d5699
chore(): Add goreleaser config
obalunenko badbd55
refactor(): Move code to cmd and minor enhacnements
obalunenko fddce20
chore(): Add helper scripts
obalunenko db3edea
chore(): Add version info
obalunenko fdac5c5
chore(): Add dependabot config
obalunenko b7ac9b6
chore(): Add ci configs
obalunenko 03b9fcf
chore(): Add Makefile for automation purpose
obalunenko dbb4903
chore(): Fix tools versions
obalunenko 5705236
chore(): Unexport local scope variables, add comments
obalunenko ad6ddc7
chore(): Not fail ci on linters warning
obalunenko e5bfb7e
chore(): Add empty ending lines
obalunenko 0fdecbc
chore(): Fix no new empty line
obalunenko a56de34
chore(): Fix no new empty line
obalunenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
NAME=pixelizer | ||
|
||
SHELL := env DOCKER_REPO=$(DOCKER_REPO) $(SHELL) | ||
DOCKER_REPO?=eu.gcr.io/melsoft-infra | ||
|
||
SHELL := env VERSION=$(VERSION) $(SHELL) | ||
VERSION ?= $(shell date -u +%Y%m%d.%H.%M.%S) | ||
|
||
|
||
# COLORS | ||
GREEN := $(shell tput -Txterm setaf 2) | ||
YELLOW := $(shell tput -Txterm setaf 3) | ||
WHITE := $(shell tput -Txterm setaf 7) | ||
RESET := $(shell tput -Txterm sgr0) | ||
|
||
|
||
TARGET_MAX_CHAR_NUM=20 | ||
|
||
|
||
define colored | ||
@echo '${GREEN}$1${RESET}' | ||
endef | ||
|
||
## Show help | ||
help: | ||
${call colored, help is running...} | ||
@echo 'link this Makefile from scripts dir to core root' | ||
@echo '' | ||
@echo 'Usage:' | ||
@echo ' ${YELLOW}make${RESET} ${GREEN}<target>${RESET}' | ||
@echo '' | ||
@echo 'Targets:' | ||
@awk '/^[a-zA-Z\-\_0-9]+:/ { \ | ||
helpMessage = match(lastLine, /^## (.*)/); \ | ||
if (helpMessage) { \ | ||
helpCommand = substr($$1, 0, index($$1, ":")-1); \ | ||
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ | ||
printf " ${YELLOW}%-$(TARGET_MAX_CHAR_NUM)s${RESET} ${GREEN}%s${RESET}\n", helpCommand, helpMessage; \ | ||
} \ | ||
} \ | ||
{ lastLine = $$0 }' $(MAKEFILE_LIST) | ||
|
||
## vet project | ||
vet: | ||
${call colored, vet is running...} | ||
./scripts/vet.sh | ||
.PHONY: vet | ||
|
||
## Compile executable | ||
compile: | ||
${call colored, compile is running...} | ||
./scripts/compile.sh | ||
.PHONY: compile | ||
|
||
## Release | ||
release: | ||
./scripts/release.sh | ||
.PHONY: release | ||
|
||
## Release local snapshot | ||
release-local-snapshot: | ||
${call colored, release is running...} | ||
./scripts/release-local-snapshot.sh | ||
.PHONY: release-local-snapshot | ||
|
||
## Installs tools from vendor. | ||
install-tools: sync-vendor | ||
./scripts/install-tools.sh | ||
.PHONY: install-tools | ||
|
||
## Sync vendor of root project and tools. | ||
sync-vendor: | ||
./scripts/sync-vendor.sh | ||
.PHONY: sync-vendor |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know much about dockers and makefiles, but doesn't this mean we won't be able to compile if this docker repo is down someday ? Also, it seems this repo has the name of your company. I don't know if it is relevant to use your company's docker repo here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you mark this as resolved please provide an answer about it so I can know if you will fix it