From b62643fdab76fa1e6edbccd3bed9805ce49da9fc Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Sat, 1 May 2021 13:29:43 +0500 Subject: [PATCH 1/7] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..27b588f --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '21 18 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'go', 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled languagehttps://github.com/bouncepaw/mycorrhiza/commit/c7ab41a3b0bb21575dd5e896116f3b193b57165a + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 67f39130e18538ace5012f0dca65d2b870d8e832 Mon Sep 17 00:00:00 2001 From: Mikhail Chekan Date: Mon, 17 May 2021 16:25:20 +0800 Subject: [PATCH 2/7] Add basic Nix packaging --- default.nix | 5 +++++ release.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 default.nix create mode 100644 release.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..c890ba6 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ pkgs ? import {} }: + +# TODO: add shell support +pkgs.callPackage ./release.nix { } + diff --git a/release.nix b/release.nix new file mode 100644 index 0000000..a9b0410 --- /dev/null +++ b/release.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, fetchFromGitHub, buildGoModule +, git +}: + +buildGoModule rec { + pname = "mycorrhiza"; + version = "1.1.0"; + + src = ./.; + + # That's for a nixpkgs release or something. Mind the hashes. + # src = fetchFromGitHub { + # owner = "bouncepaw"; + # repo = "mycorrhiza"; + # rev = "v${version}"; + # sha256 = "0di4msrl44jcnhck11k0r7974cjnwdyw45b3hf0s3dbwx6ijdkdd"; + # fetchSubmodules = true; + # }; + + vendorSha256 = "0hxcbfh55avly9gvdysqgjzh66g7rdy2l0wmy9jnlq0skpa6j0jq"; + + subPackages = [ "." ]; + + propagatedBuildInputs = [ git ]; + + meta = with lib; { + description = "Filesystem and git-based wiki engine written in Go using mycomarkup as its primary markup language"; + homepage = "https://github.com/bouncepaw/mycorrhiza"; + license = licenses.agpl3; + # maintainers = with maintainers; [ bouncepaw ]; + platforms = platforms.linux; + }; +} From fcc6ec1549d0b0a2c79d73461505c711a59bf075 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Thu, 27 May 2021 17:04:10 +0500 Subject: [PATCH 3/7] Indent marshalled JSON It is a quickfix requested by Dan --- user/files.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/files.go b/user/files.go index c1f0172..93b8b78 100644 --- a/user/files.go +++ b/user/files.go @@ -101,7 +101,7 @@ func dumpRegistrationCredentials() error { tmp = append(tmp, copiedUser) } - blob, err := json.Marshal(tmp) + blob, err := json.MarshalIndent(tmp, "", "\t") if err != nil { log.Println(err) return err @@ -124,7 +124,7 @@ func dumpTokens() { return true }) - blob, err := json.Marshal(tmp) + blob, err := json.MarshalIndent(tmp, "", "\t") if err != nil { log.Println(err) } else { From 930260ddf02ec72d9970c9b4fb912f4e17c8b496 Mon Sep 17 00:00:00 2001 From: Astrr Date: Fri, 28 May 2021 16:04:33 +0300 Subject: [PATCH 4/7] Fix the link to the deployment guide --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b13f99c..fdf28b3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A wiki engine. [Main wiki](https://mycorrhiza.lesarbr.es) ## Building -Also see [detailed instructions](https://mycorrhiza.lesarbr.es/hypha/deploy) on wiki. +Also see [detailed instructions](https://mycorrhiza.lesarbr.es/hypha/guide/deployment) on wiki. ```sh git clone --recurse-submodules https://github.com/bouncepaw/mycorrhiza cd mycorrhiza From 10e08313a5134b913b2177be0fadb15dd8c74041 Mon Sep 17 00:00:00 2001 From: Alexey Gusev Date: Fri, 28 May 2021 19:58:25 +0300 Subject: [PATCH 5/7] Add PKGBUILD --- PKGBUILD | 17 +++++++++++++++++ README.md | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..bef8cc7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,17 @@ +pkgname=mycorrhiza +pkgver=1.1.0 +pkgrel=1 +pkgdesc="Filesystem and git-based wiki engine written in Go using mycomarkup as its primary markup language." +arch=('x86_64' 'i686') +url="https://github.com/bouncepaw/mycorrhiza" +license=('AGPL3') +depends=('git') +source_x86_64=("$pkgname-$pkgver.tar.gz::https://github.com/bouncepaw/mycorrhiza/releases/download/v$pkgver/mycorrhiza-v$pkgver-linux-amd64.tar.gz") +source_i686=("$pkgname-$pkgver.tar.gz::https://github.com/bouncepaw/mycorrhiza/releases/download/v$pkgver/mycorrhiza-v$pkgver-linux-868.tar.gz") +md5sums_x86_64=('aa62f1c71f082332df4f67d40c8dcdbd') +md5sums_i686=('aa62f1c71f082332df4f67d40c8dcdbd') + +package() { + install -Dm755 "mycorrhiza" "$pkgdir/usr/bin/mycorrhiza" +} + diff --git a/README.md b/README.md index fdf28b3..0f03c0d 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,14 @@ make # * create an executable called `mycorrhiza`. Run it with path to your wiki. ``` +## Installing + +If you use linux disto with pacman package manager (Arch, Manjaro, Garuda, etc) you can install it from PKGBUILD: +```sh +$ wget https://raw.githubusercontent.com/bouncepaw/mycorrhiza/master/PKGBUILD +$ makepkg --install +``` + ## Usage ``` mycorrhiza [OPTIONS...] WIKI_PATH From f5856d8bdaf1198afae091f269f40aa91084ab33 Mon Sep 17 00:00:00 2001 From: Astrr Date: Fri, 28 May 2021 20:41:11 +0300 Subject: [PATCH 6/7] Fix typos and a bit of wording change in readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0f03c0d..b46f572 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ make ## Installing -If you use linux disto with pacman package manager (Arch, Manjaro, Garuda, etc) you can install it from PKGBUILD: +If you use a linux distro with pacman package manager (Arch, Manjaro, Garuda, etc) you can install it using PKGBUILD: ```sh $ wget https://raw.githubusercontent.com/bouncepaw/mycorrhiza/master/PKGBUILD $ makepkg --install @@ -26,7 +26,7 @@ $ makepkg --install ``` mycorrhiza [OPTIONS...] WIKI_PATH -WIKI_PATH must be a path to git repository which you want to be a wiki. +WIKI_PATH must be a path to a git repository which you want to be a wiki. Options: -config-path string @@ -37,7 +37,7 @@ Options: ## Features * Wiki pages (called hyphae) are written in mycomarkup -* Edit pages through html forms, graphical preview, toolbar that helps you use the markup +* Edit pages through html forms, a graphical preview and a toolbar that helps you use mycomarkup * Responsive design, dark theme (synced with system theme) * Works in text browsers * Everything is stored as simple files, no database required. You can run a wiki on almost any directory and get something to work with @@ -47,13 +47,13 @@ Options: * History page * Random page * Recent changes page; RSS, Atom and JSON feeds available -* Hyphae can be deleted (while still preserving history) +* Hyphae can be deleted while still preserving history * Hyphae can be renamed (recursive renaming of subhyphae is also supported) * Light on resources * Authorization with pre-set credentials, registration * Basic Gemini protocol support ## Contributing -Help is always needed. We have a [tg chat](https://t.me/mycorrhizadev) where some development is coordinated. You can also sponsor on [boosty](https://boosty.to/bouncepaw). Feel free to open an issue or contact directly. +Help is always needed. We have a [tg chat](https://t.me/mycorrhizadev) where some development is coordinated. You can also sponsor us on [boosty](https://boosty.to/bouncepaw). Feel free to open an issue or contact us directly. You can view list of all planned features on [our kanban board](https://github.com/bouncepaw/mycorrhiza/projects/1). From c272796d071cd2594203f9edc338df11adf3a5c2 Mon Sep 17 00:00:00 2001 From: Astrr Date: Fri, 28 May 2021 20:47:02 +0300 Subject: [PATCH 7/7] Turns out we're not Bouncepaw --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b46f572..06aba96 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,6 @@ Options: * Basic Gemini protocol support ## Contributing -Help is always needed. We have a [tg chat](https://t.me/mycorrhizadev) where some development is coordinated. You can also sponsor us on [boosty](https://boosty.to/bouncepaw). Feel free to open an issue or contact us directly. +Help is always needed. We have a [tg chat](https://t.me/mycorrhizadev) where some development is coordinated. You can also sponsor bouncepaw on [boosty](https://boosty.to/bouncepaw). Feel free to open an issue or contact us directly. You can view list of all planned features on [our kanban board](https://github.com/bouncepaw/mycorrhiza/projects/1).