From 1f8a5c4d5e7acbe1bcbab1009d411aa5d9d10ef5 Mon Sep 17 00:00:00 2001 From: John Guo Date: Mon, 30 Dec 2024 20:46:38 +0800 Subject: [PATCH] examples --- .github/workflows/ci-main.yml | 8 ++----- .github/workflows/nacos/docker-compose.yml | 2 +- .gitmodules | 3 +++ CONTRIBUTING.md | 15 ++++++++++++ Makefile | 27 ++++++++++++++++++++++ contrib/registry/consul/go.sum | 2 +- example/README.MD | 2 ++ examples | 1 + 8 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 .gitmodules create mode 100644 CONTRIBUTING.md create mode 100644 example/README.MD create mode 160000 examples diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 888476f77d9..6b2b36947a1 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -152,13 +152,9 @@ jobs: # Polaris backend server. # docker run -d --name polaris \ # -p 8090:8090 -p 8091:8091 -p 8093:8093 -p 9090:9090 -p 9091:9091 \ - # loads/polaris-server-standalone:1.11.2 - # - # docker run -d --name polaris \ - # -p 8090:8090 -p 8091:8091 -p 8093:8093 -p 9090:9090 -p 9091:9091 \ - # loads/polaris-standalone:v1.16.3 + # polarismesh/polaris-standalone:v1.17.2 polaris: - image: loads/polaris-standalone:v1.17.2 + image: polarismesh/polaris-standalone:v1.17.2 ports: - 8090:8090 - 8091:8091 diff --git a/.github/workflows/nacos/docker-compose.yml b/.github/workflows/nacos/docker-compose.yml index 3e69daa7c5a..24b39e3e6d0 100644 --- a/.github/workflows/nacos/docker-compose.yml +++ b/.github/workflows/nacos/docker-compose.yml @@ -17,7 +17,7 @@ services: retries: 10 initializer: - image: loads/curl:latest + image: alpine/curl:latest depends_on: nacos: condition: service_healthy diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..895782dadd7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "examples"] + path = examples + url = git@github.com:gogf/examples.git diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..1d26a21f207 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing + +Thanks for taking the time to join our community and start contributing! + +## With issues +- Use the search tool before opening a new issue. +- Please provide source code and commit sha if you found a bug. +- Review existing issues and provide feedback or react to them. + +## With pull requests +- Open your pull request against `master` +- Your pull request should have no more than two commits, if not you should squash them. +- It should pass all tests in the available continuous integrations systems such as GitHub CI. +- You should add/modify tests to cover your proposed code changes. +- If your pull request contains a new feature, please document it on the README. diff --git a/Makefile b/Makefile index 9d0ee13e91a..b333d6986c0 100644 --- a/Makefile +++ b/Makefile @@ -26,3 +26,30 @@ version: newVersion=$(to); \ ./.set_version.sh ./ $$newVersion; \ echo "make version to=$(to) done" + + +# update submodules +.PHONY: subup +subup: + @set -e; \ + cd examples; \ + echo "Updating submodules..."; \ + git pull origin; \ + cd ..; + +# update and commit submodules +.PHONY: subsync +subsync: subup + @set -e; \ + echo "";\ + cd examples; \ + echo "Checking for changes..."; \ + if git diff-index --quiet HEAD --; then \ + echo "No changes to commit"; \ + else \ + echo "Found changes, committing..."; \ + git add -A; \ + git commit -m "examples update"; \ + git push origin; \ + fi; \ + cd ..; diff --git a/contrib/registry/consul/go.sum b/contrib/registry/consul/go.sum index caf44ad1f98..52eedb814fc 100644 --- a/contrib/registry/consul/go.sum +++ b/contrib/registry/consul/go.sum @@ -193,7 +193,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/example/README.MD b/example/README.MD new file mode 100644 index 00000000000..d517ff61851 --- /dev/null +++ b/example/README.MD @@ -0,0 +1,2 @@ +This repository is deprecated and moved to standalone +repository: https://github.com/gogf/examples \ No newline at end of file diff --git a/examples b/examples new file mode 160000 index 00000000000..cf45631debb --- /dev/null +++ b/examples @@ -0,0 +1 @@ +Subproject commit cf45631debbc6e0fc5925b9fac18247da288823d