Skip to content
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

feat: MVP1 tasks. #55

Merged
merged 89 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
9241364
feat: connect mysql and get article by id
Baihhh Jan 11, 2024
e7f21a9
merge
Baihhh Jan 11, 2024
236cf0d
feat: Complete multimedia functions
xhyqaq Jan 11, 2024
1edb80b
feat:article's CRUD
Baihhh Jan 11, 2024
d5f8789
feat: article' CRUD
Baihhh Jan 12, 2024
a86f2ac
feat: article' CRUD
Baihhh Jan 12, 2024
f974d52
feat: Add video to text test.
IRONICBo Jan 16, 2024
2bf279a
Add files via upload
wu-jj Jan 16, 2024
17263fc
Merge branch 'main' of github.com:Baihhh/community
Baihhh Jan 12, 2024
3d16579
feat:Complete QiNiu Kodo modification go cloud
xhyqaq Jan 15, 2024
4582346
Update community_yap.gox
wu-jj Jan 18, 2024
5e78df3
casdoor config
wu-jj Jan 18, 2024
96366d0
Update gop_autogen.go
wu-jj Jan 18, 2024
282a033
Update community_yap.gox
wu-jj Jan 18, 2024
7639378
Update community.gop
wu-jj Jan 18, 2024
c9ddd49
Update callback_yap.html
wu-jj Jan 18, 2024
8fdd02e
Delete login/service/gop_autogen.go
wu-jj Jan 18, 2024
2fe7204
feat: Complete multimedia functions
xhyqaq Jan 11, 2024
c54c63f
delete note
wu-jj Jan 18, 2024
0e8197b
feat: Update ASR and TTS function.
IRONICBo Jan 18, 2024
84dbb14
fix: Update variable.
IRONICBo Jan 19, 2024
4598b3b
Merge branch 'main' into feat/mvp-20240119
IRONICBo Jan 19, 2024
43f0bdf
fix: Update sum.
IRONICBo Jan 19, 2024
0fa789b
Merge branch 'dev' of https://github.com/xhyqaq/community into dev
xhyqaq Jan 18, 2024
0671367
merge: merge translation、media、article_html、add_html
Baihhh Jan 19, 2024
3b0efce
Merge pull request #3 from wu-jj/main
IRONICBo Jan 19, 2024
e39314c
Merge branch 'feat/mvp-20240119' into main
IRONICBo Jan 19, 2024
68a4a08
Merge pull request #4 from xhyqaq/main
IRONICBo Jan 19, 2024
f92ec31
Merge branch 'feat/mvp-20240119' into merge
Baihhh Jan 19, 2024
23731de
Merge pull request #5 from Baihhh/merge
IRONICBo Jan 19, 2024
75bafd6
fix: Fix ctx error.
IRONICBo Jan 19, 2024
727b82b
feat: save html to media and fix the uploadMedia
Baihhh Jan 19, 2024
7d08089
Merge branch 'dev' of https://github.com/xhyqaq/community into dev
xhyqaq Jan 18, 2024
0509be4
Merge branch 'feat/mvp-20240119' into main
IRONICBo Jan 19, 2024
f001502
Merge pull request #9 from xhyqaq/main
IRONICBo Jan 19, 2024
6d19800
auto deployment using github action
linjie7674 Jan 19, 2024
d0bc4ea
Merge pull request #10 from linjie7674/feat/cicd_deploy
IRONICBo Jan 19, 2024
89000b0
chore: Update packages and types.
IRONICBo Jan 19, 2024
0edfdd7
Merge branch 'feat/mvp-20240119' of https://github.com/IRONICBo/commu…
IRONICBo Jan 19, 2024
5d89de4
fix: Update yap package.
IRONICBo Jan 19, 2024
ac549c1
feat: Support env config.
IRONICBo Jan 19, 2024
28b038f
Merge branch 'feat/mvp-20240119' into merge
IRONICBo Jan 20, 2024
fffaf6f
Merge pull request #8 from Baihhh/merge
IRONICBo Jan 20, 2024
59d15f7
refactor: translate to article
Baihhh Jan 20, 2024
e92ed03
merge
Baihhh Jan 20, 2024
6e580e3
Merge pull request #11 from Baihhh/merge
IRONICBo Jan 20, 2024
3104f25
merge
Baihhh Jan 20, 2024
e099106
feat: Support config and zap log.
IRONICBo Jan 20, 2024
51489be
Merge branch 'feat/mvp-20240119' of https://github.com/IRONICBo/commu…
IRONICBo Jan 20, 2024
bdd5d80
feat: Update type.
IRONICBo Jan 20, 2024
96cfc23
fix: Remove generate files.
IRONICBo Jan 20, 2024
9405e4b
fix: Remove account modules.
IRONICBo Jan 20, 2024
059fa66
docs: Update README.
IRONICBo Jan 21, 2024
32db959
merge: solve conflict
Baihhh Jan 21, 2024
6d1b4b6
fix: Update static fs.
IRONICBo Jan 21, 2024
0e0f60e
fix: Fix markdown UI.
IRONICBo Jan 21, 2024
2e13c0a
Merge pull request #12 from Baihhh/merge
IRONICBo Jan 21, 2024
5ebb394
fix: Update markdown html.
IRONICBo Jan 21, 2024
eafd123
Merge branch 'feat/mvp-20240119' of https://github.com/IRONICBo/commu…
IRONICBo Jan 21, 2024
695f4a9
fix: Merge gen files.
IRONICBo Jan 21, 2024
08ad71a
fix: search & fix token parse
Baihhh Jan 21, 2024
1809f56
feat: Add user interaction in web.
IRONICBo Jan 21, 2024
c893618
fix: Update article page.
IRONICBo Jan 21, 2024
f088b5b
Merge branch 'feat/mvp-20240119' into merge
Baihhh Jan 22, 2024
8a1875f
fix: Remove connect type.
IRONICBo Jan 22, 2024
25d5be3
Merge pull request #13 from Baihhh/merge
IRONICBo Jan 22, 2024
ed920ab
fix: Update request param.
IRONICBo Jan 22, 2024
837ddab
fix the bug that go version is not correct and add the deployment of …
linjie7674 Jan 22, 2024
3ca283a
delete the unnecessary print
linjie7674 Jan 22, 2024
0384a02
Merge pull request #14 from linjie7674/bugfix/cicd_deploy
IRONICBo Jan 22, 2024
3ff5a77
feat: Support to get user info.
IRONICBo Jan 22, 2024
0c05975
Merge branch 'feat/mvp-20240119' of https://github.com/IRONICBo/commu…
IRONICBo Jan 22, 2024
cc98bc4
Merge branch 'feat/mvp-20240119' of https://github.com/IRONICBo/commu…
IRONICBo Jan 22, 2024
94ab953
fix: article add
Baihhh Jan 22, 2024
5d693b5
Merge branch 'feat/mvp-20240119' into merge
Baihhh Jan 22, 2024
f9e0ca3
feat: Add std pages.
IRONICBo Jan 22, 2024
c7e9ce3
Merge branch 'feat/mvp-20240119' into merge
IRONICBo Jan 22, 2024
7425310
Merge pull request #15 from Baihhh/merge
IRONICBo Jan 22, 2024
e11026a
fix: Fix errors.
IRONICBo Jan 22, 2024
2a78c09
fix: Fix file reader.
IRONICBo Jan 22, 2024
b885b18
bugfix: fix the bug in cloning specific branch
linjie7674 Jan 22, 2024
5d23634
fix: Update article list and user.
IRONICBo Jan 22, 2024
704e180
fix: upload picture & edit
Baihhh Jan 22, 2024
14f3579
Merge branch 'feat/mvp-20240119' into merge
Baihhh Jan 22, 2024
8d8b195
Merge pull request #17 from Baihhh/merge
IRONICBo Jan 22, 2024
bfe0b72
Merge pull request #16 from linjie7674/bugfix/docker
IRONICBo Jan 22, 2024
8fcfb9b
fix: search page optimization
Baihhh Jan 23, 2024
24b8c0d
fix: add author to article and home page
Baihhh Jan 24, 2024
760b5f9
fix: user and article search
Baihhh Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: deploy

on:
push:
branches:
- 'feat/mvp-20240119'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/goplus-community:latest
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release Build

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2

- name: Checkout tag
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
tag_name="${GITHUB_REF##*/}"
echo Current tag: $tag_name
git checkout $tag_name
echo "TAG_NAME=${tag_name}" >> $GITHUB_ENV

- name: Check VERSION consistency
run: |
tag=$(git describe --tags --dirty)
version=$(cat VERSION)
if [ "$tag" != "$version" ]; then
echo "VERSION file is not consistent with tag name"
echo "VERSION: $version"
echo "TAG: $tag"
exit 1
fi

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.19"

- name: Release with goreleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean -p 4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Upload deb/rpm to Fury.io
# run: |
# for file in dist/*.{deb,rpm}
# do
# echo "Uploading $file to Fury.io"
# curl -sS -F package=@$file https://[email protected]/goplus/
# done
# env:
# FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@

# Go workspace file
go.work

# env file
.env

# Autogenerated files from goplus generate
gop_autogen.go
50 changes: 50 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 1

before:
hooks:
# You may remove this if you don't use go modules.
# you may remove this if you don't need go generate

builds:
- id: 'gopcomm'
main: ./cmd/gopcomm/gop_autogen.go
binary: gopcomm
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.19

RUN apt-get update

WORKDIR /community

# install goplus
RUN cd .. && git clone -b v1.2.0-pre.1 https://github.com/goplus/gop.git && cd gop && ./all.bash

# run goplus-community
COPY . .

# download account repository
RUN cd .. && git clone -b feat/init-account https://github.com/IRONICBo/account.git
CMD bash scripts/start.sh
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,46 @@ Go+ Community written in Go+
[![GitHub release](https://img.shields.io/github/v/tag/goplus/community.svg?label=release)](https://github.com/goplus/community/releases)
[![Coverage Status](https://codecov.io/gh/goplus/community/branch/main/graph/badge.svg)](https://codecov.io/gh/goplus/community)
[![GoDoc](https://pkg.go.dev/badge/github.com/goplus/community.svg)](https://pkg.go.dev/github.com/goplus/community)

### 🧳 Features

Go+ Community written in Go+ and Yap, support Go+ Community development.


### 🚀 How to run

1. **Prepare golang and goplus environment.**

- golang version >= 1.19
- https://go.dev/dl/ (golang download, Find the golang 1.19 version)
- goplus version == v1.2.0-pre.1
- Ref: https://github.com/goplus/gop/releases
- How to install goplus: https://github.com/goplus/gop#how-to-install

2. **Prepare for your own config**

- Clone a file named `.env` from `.env_temp` in the `cmd/gopcomm` directory of the project.
- Modify the `.env` file to your own configuration.

3. **Run the project**

- Run the project with the following command:

```shell
gop run .
```

- Open the browser and enter the address: `http://localhost:8080` or `GOP_COMMUNITY_ENDPOINT` in your `.env` file.


### 📦 Contribute

1. **Fork the repository to your local repo**

2. **Modify your own code**

3. **Commit your code**

4. **Create a pull request**

> **Note:** Please check the PR brach is `mvp-20240119` or not.
41 changes: 41 additions & 0 deletions cmd/gopcomm/.env_temp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Copyright (c) 2023 The GoPlus Authors (goplus.org). All rights reserved.
#
# 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.
#

### Account Config
GOP_ACCOUNT_ENDPOINT="0.0.0.0:8081"

### Community Config
GOP_COMMUNITY_ENDPOINT="0.0.0.0:8080"

# Database DSN
GOP_COMMUNITY_DSN=

# Qiniu Storage
GOP_COMMUNITY_BLOBUS=
GOP_COMMUNITY_DOMAIN=

# Qiniu Dora Service
QINIU_ACCESS_KEY=
QINIU_SECRET_KEY=

# XiaoQiu Translation Service
QIU_TRANSLATION_KEY=

# XiaoQiu Translation Service
NIUTRANS_API_KEY=

# Casdoor config
GOP_CASDOOR_CERTIFICATE=
Loading