Skip to content

Commit 02ffd7e

Browse files
committed
[chore] update makefiles and workflows
Signed-off-by: Lee Calcote <[email protected]>
1 parent 517fc03 commit 02ffd7e

File tree

4 files changed

+138
-19
lines changed

4 files changed

+138
-19
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DEFAULT_GOAL := show-help
2+
# See <https://gist.github.com/klmr/575726c7e05d8780505a> for explanation.
3+
.PHONY: show-help
4+
show-help:
5+
@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')

.github/build/Makefile.core.mk

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright Meshery Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
#-----------------------------------------------------------------------------
16+
# Global Variables
17+
#-----------------------------------------------------------------------------
18+
GIT_VERSION = $(shell git describe --tags `git rev-list --tags --max-count=1`)
19+
GIT_COMMITSHA = $(shell git rev-list -1 HEAD)
20+
GIT_STRIPPED_VERSION=$(shell git describe --tags `git rev-list --tags --max-count=1` | cut -c 2-)
21+
22+
# Extension Point for remote provider . Add your provider here.
23+
REMOTE_PROVIDER="Layer5"
24+
25+
LOCAL_PROVIDER="None"
26+
GOVERSION = 1.23
27+
GOPATH = $(shell go env GOPATH)
28+
GOBIN = $(GOPATH)/bin
29+
KEYS_PATH="../../server/permissions/keys.csv"
30+
31+
SHELL := /usr/bin/env bash -o pipefail
32+
33+
#-----------------------------------------------------------------------------
34+
# Components
35+
#-----------------------------------------------------------------------------
36+
# All Adapters
37+
# ADAPTER_URLS := "localhost:10000 localhost:10001 localhost:10002 localhost:10004 localhost:10005 localhost:10006 localhost:10007 localhost:10009 localhost:10010 localhost:10012"
38+
# No Adapters
39+
ADAPTER_URLS := "localhost:10000 localhost:10001 localhost:10012 localhost:10013"
40+
41+
#-----------------------------------------------------------------------------
42+
# Providers (Add your provider here. See https://docs.meshery.io/extensibility/providers)
43+
#-----------------------------------------------------------------------------
44+
REMOTE_PROVIDER_LOCAL="http://localhost:9876"
45+
EQUINIX_DEV="http://meshery.console.equinix.com"
46+
EQUINIX_DEV2="http://meshery-2.console.equinix.com"
47+
MESHERY_CLOUD_DEV="http://localhost:9876"
48+
MESHERY_CLOUD_PROD="https://cloud.layer5.io"
49+
MESHERY_CLOUD_STAGING="https://staging-cloud.layer5.io"
50+
EXOSCALE_PROD="https://sks.exoscale.com"
51+
EXOSCALE_STG="https://stg-sks.exoscale.com"
52+
EXOSCALE_DEV="https://dev-sks.exoscale.com"
53+
54+
#-----------------------------------------------------------------------------
55+
# Server
56+
#-----------------------------------------------------------------------------
57+
MESHERY_K8S_SKIP_COMP_GEN ?= TRUE
58+
APPLICATIONCONFIGPATH="./apps.json"
59+
PORT:=9081
60+
61+
#-----------------------------------------------------------------------------
62+
# Build
63+
#-----------------------------------------------------------------------------
64+
RELEASE_CHANNEL="edge"

.github/build/latest_release.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
# GIT_REF=`git symbolic-ref HEAD`
4+
# if [[ $GIT_REF = refs/tags* ]]
5+
# then
6+
# RELEASE_CHANNEL="stable"
7+
# # export RELEASE_CHANNEL="stable"
8+
# else
9+
# RELEASE_CHANNEL="edge"
10+
# # export RELEASE_CHANNEL="edge"
11+
# fi
12+
# # echo "Release channel determined to be $RELEASE_CHANNEL"
13+
# LATEST_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
14+
GIT_REF=`git symbolic-ref HEAD`
15+
if [[ $GIT_REF = refs/tags* ]]
16+
then
17+
RELEASE_CHANNEL="stable"
18+
# export RELEASE_CHANNEL="stable"
19+
else
20+
RELEASE_CHANNEL="edge"
21+
# export RELEASE_CHANNEL="edge"
22+
fi
23+
echo "Release channel determined to be $RELEASE_CHANNEL"
24+
echo LATEST_VERSION=$(git describe --tags `git rev-list --tags --max-count=1` --always)
25+
echo GIT_VERSION=$(git describe --tags `git rev-list --tags --max-count=1` --always)
26+
echo GIT_STRIPPED_VERSION=$(git describe --tags `git rev-list --tags --max-count=1` --always | cut -c 2-)
27+
# env

Makefile

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
1-
check:
2-
golangci-lint run
3-
4-
check-clean-cache:
5-
golangci-lint cache clean
6-
7-
protoc-setup:
8-
wget -P meshes https://raw.githubusercontent.com/layer5io/meshery/master/meshes/meshops.proto
9-
10-
proto:
11-
protoc -I meshes/ meshes/meshops.proto --go_out=plugins=grpc:./meshes/
12-
13-
14-
1+
# Copyright Layer5, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
include .github/build/Makefile.show-help.mk
16+
17+
## Install docs.layer5.io dependencies on your local machine.
18+
## See https://gohugo.io/categories/installation
19+
setup:
20+
npm install
21+
22+
## Run docs.layer5.io on your local machine with draft and future content enabled.
23+
site: check-go
24+
hugo server -D -F
25+
26+
## Run docs.layer5.io on your local machine. Alternate method.
27+
site-fast:
28+
gatsby develop
29+
30+
## Build docs.layer5.io on your local machine.
31+
build:
32+
hugo
1533

34+
## Empty build cache and run docs.layer5.io on your local machine.
35+
clean:
36+
hugo --cleanDestinationDir
37+
make site
1638

17-
site:
18-
$(jekyll) serve --drafts --livereload
39+
.PHONY: setup build site clean site-fast check-go
1940

20-
build:
21-
$(jekyll) build --drafts
41+
check-go:
42+
@echo "Checking if Go is installed..."
43+
@command -v go > /dev/null || (echo "Go is not installed. Please install it before proceeding."; exit 1)
44+
@echo "Go is installed."
2245

2346
docker:
24-
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"
47+
docker compose watch

0 commit comments

Comments
 (0)