diff --git a/.github/build/Makefile.core.mk b/.github/build/Makefile.core.mk new file mode 100644 index 00000000..c41cf936 --- /dev/null +++ b/.github/build/Makefile.core.mk @@ -0,0 +1,54 @@ +# Copyright Meshery Authors +# +# 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. + +#----------------------------------------------------------------------------- +# Global Variables +#----------------------------------------------------------------------------- +GIT_VERSION = $(shell git describe --tags `git rev-list --tags --max-count=1`) +GIT_COMMITSHA = $(shell git rev-list -1 HEAD) +GIT_STRIPPED_VERSION=$(shell git describe --tags `git rev-list --tags --max-count=1` | cut -c 2-) +REMOTE_PROVIDER="Meshery" +LOCAL_PROVIDER="None" +GOVERSION = 1.21 +GOPATH = $(shell go env GOPATH) +GOBIN = $(GOPATH)/bin + +SHELL :=/bin/bash -o pipefail + +#----------------------------------------------------------------------------- +# Components +#----------------------------------------------------------------------------- +# All Adapters +# ADAPTER_URLS := "localhost:10000 localhost:10001 localhost:10002 localhost:10004 localhost:10005 localhost:10006 localhost:10007 localhost:10009 localhost:10010 localhost:10012" +# No Adapters +ADAPTER_URLS := "" + +#----------------------------------------------------------------------------- +# Providers +#----------------------------------------------------------------------------- +REMOTE_PROVIDER_LOCAL="http://localhost:9876" +MESHERY_CLOUD_DEV="http://localhost:9876" +MESHERY_CLOUD_PROD="https://meshery.layer5.io" +MESHERY_CLOUD_STAGING="https://staging-meshery.layer5.io" + +#----------------------------------------------------------------------------- +# Server +#----------------------------------------------------------------------------- +MESHERY_K8S_SKIP_COMP_GEN ?= TRUE +APPLICATIONCONFIGPATH="./apps.json" + +#----------------------------------------------------------------------------- +# Build +#----------------------------------------------------------------------------- +RELEASE_CHANNEL="edge" diff --git a/.github/build/Makefile.show-help.mk b/.github/build/Makefile.show-help.mk new file mode 100644 index 00000000..3d096d8e --- /dev/null +++ b/.github/build/Makefile.show-help.mk @@ -0,0 +1,5 @@ +.DEFAULT_GOAL := show-help +# See for explanation. +.PHONY: show-help +show-help: + @echo "$$(tput bold)Please specify a build target. The choices are:$$(tput sgr0)";echo;sed -ne"/^## /{h;s/.*//;:d" -e"H;n;s/^## //;td" -e"s/:.*//;G;s/\\n## /---/;s/\\n/ /g;p;}" ${MAKEFILE_LIST}|LC_ALL='C' sort -f|awk -F --- -v n=$$(tput cols) -v i=19 -v a="$$(tput setaf 6)" -v z="$$(tput sgr0)" '{printf"%s%*s%s ",a,-i,$$1,z;m=split($$2,w," ");l=n-i;for(j=1;j<=m;j++){l-=length(w[j])+1;if(l<= 0){l=n-i-length(w[j])-1;printf"\n%*s ",-i," ";}printf"%s ",w[j];}printf"\n";}'|more $(shell test $(shell uname) == Darwin && echo '-Xr') \ No newline at end of file diff --git a/Makefile b/Makefile index e6249697..31b54825 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,39 @@ -check: - golangci-lint run - -check-clean-cache: - golangci-lint cache clean - -protoc-setup: - wget -P meshes https://raw.githubusercontent.com/layer5io/meshery/master/meshes/meshops.proto - -proto: - protoc -I meshes/ meshes/meshops.proto --go_out=plugins=grpc:./meshes/ - - - - - +# Copyright Layer5, Inc. +# +# 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. + +include .github/build/Makefile.show-help.mk + +## Install docs.layer5.io dependencies your local machine. +## See https://gohugo.io/categories/installation +setup: + hugo server -D + +## Run docs.layer5.io on your local machine with draft and future content enabled. site: - $(jekyll) serve --drafts --livereload + hugo server -D -F + +## Run docs.layer5.io on your local machine. Alternate method. +site-fast: + gatsby develop +## Build docs.layer5.io on your local machine. build: - $(jekyll) build --drafts + hugo + +## Empty build cache and run docs.layer5.io on your local machine. +clean: + hugo --cleanDestinationDir + site -docker: - docker run --name site -d --rm -p 4000:4000 -v `pwd`:"/srv/jekyll" jekyll/jekyll:4.0.0 bash -c "bundle install; jekyll serve --drafts --livereload" +.PHONY: setup build site clean site-fast