From 1f4e9f5581f55fb0eb73a4838f1b5fdd4ee4bb40 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 15 Jun 2022 15:54:40 +0100 Subject: [PATCH 1/7] Revert "fix: defaultIsOpen state for linked refs" This reverts commit 59fbb6088471eda9f5915cd2729fdfd5c4c2fc03. --- src/js/components/References/References.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/components/References/References.tsx b/src/js/components/References/References.tsx index df574b43aa..417484f92e 100644 --- a/src/js/components/References/References.tsx +++ b/src/js/components/References/References.tsx @@ -76,7 +76,7 @@ export const PageReferences = withErrorBoundary(({ children, count, title, defau onOpen: onOpen }); - const isShowingContent = defaultIsOpen; + const isShowingContent = isOpen && !!children; return ( Date: Tue, 14 Jun 2022 17:11:04 +0100 Subject: [PATCH 2/7] ci: deploy prerelease to beta domain --- .github/workflows/build.yml | 11 +++++++++-- .gitignore | 2 ++ script/vercel-setup.sh | 7 ++++--- {vercel-prod => vercel-release}/package.json | 0 4 files changed, 15 insertions(+), 5 deletions(-) rename {vercel-prod => vercel-release}/package.json (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e30324246..65e2f0efd9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -143,14 +143,21 @@ jobs: path: resources - name: Copy built app to a vercel prod deploy folder - run: mkdir -p vercel-prod/vercel-static/athens && cp -R resources/public/. vercel-prod/vercel-static/athens/ + run: mkdir -p vercel-release/vercel-static/athens && cp -R resources/public/. vercel-release/vercel-static/athens/ - uses: amondnet/vercel-action@v20 with: vercel-token: ${{ secrets.VERCEL_TOKEN }} vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} - vercel-args: './vercel-prod/ --prod' + scope: athens-research + vercel-args: './vercel-release/' + # Poor mans ternary operator https://github.com/actions/runner/issues/409#issuecomment-727565588 + alias-domains: ${{ env.PRERELEASE && env.PRERELEASE_DOMAIN || env.RELEASE_DOMAIN }} + env: + PRERELEASE: ${{ contains(github.ref, '-alpha.') || contains(github.ref, '-beta.') || contains(github.ref, '-rc.')}} + PRERELEASE_DOMAIN: beta.athensresearch.org + RELEASE_DOMAIN: web.athensresearch.org release-electron: diff --git a/.gitignore b/.gitignore index 8b2c4fddda..f66fb9d5aa 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ vercel-static/* !vercel-static/index.html !vercel-state/athens/.gitignore .vercel +vercel-release/* +!vercel-release/package.json diff --git a/script/vercel-setup.sh b/script/vercel-setup.sh index 66b90b2b05..440075325e 100755 --- a/script/vercel-setup.sh +++ b/script/vercel-setup.sh @@ -10,11 +10,12 @@ set -euxo pipefail # Install command : yarn vercel:install # # In Vercel -> Project Settings -> Git -# Production branch: dummy-vercel-main -# This is a dummy branch that we do not push builds to. +# Release branch: dummy-vercel-web +# Pre-release branch: dummy-vercel-beta +# These are dummy branches that we do not push builds to. # Instead the `release-web` github actions job manually builds and deploys a prod build when needed. # The build settings above are still used for the prod build though, and the -# vercel-prod/package.json file is meant to provide noop scripts for it. +# vercel-release/package.json file is meant to provide noop scripts for it. # See https://vercel.com/docs/concepts/deployments/build-step#build-image for custom setup instructions. diff --git a/vercel-prod/package.json b/vercel-release/package.json similarity index 100% rename from vercel-prod/package.json rename to vercel-release/package.json From ee29f3325f09801acd9b9cae3fb4af3cea6d5d4c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 14 Jun 2022 17:20:21 +0100 Subject: [PATCH 3/7] ci: re-enable auto updates for electron --- .github/workflows/build.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65e2f0efd9..37a59916a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,13 +109,10 @@ jobs: - uses: ./.github/custom-actions/node-env - name: Compile JS Assets for production - run: yarn prod --config-merge "{:closure-defines {athens.core/SENTRY_DSN \"${SENTRY_DSN}\" athens.util/COMMIT_URL \"${COMMIT_URL}\" athens.main.core/AUTO_UPDATE ${AUTO_UPDATE}}}" + run: yarn prod --config-merge "{:closure-defines {athens.core/SENTRY_DSN \"${SENTRY_DSN}\" athens.util/COMMIT_URL \"${COMMIT_URL}\"}}" env: SENTRY_DSN: ${{ secrets.sentry_dsn }} COMMIT_URL: "https://github.com/${{github.repository}}/commit/${{github.sha}}" - # See athens.main.core/AUTO_UPDATE for more details. - # TODO: set to true when publishing auto-update information for 2.0.0-beta. - AUTO_UPDATE: false - name: Run client e2e tests over the prod build run: yarn client:e2e @@ -216,9 +213,7 @@ jobs: # release the app after building release: ${{ startsWith(github.ref, 'refs/tags/v') }} - # TODO: remove publishAutoUpdate setting when we think enough 1.0.0-beta - # users have updated to 1.0.0, otherwise they will be auto-updated to 2.0.0-beta. - args: -c.publish.publishAutoUpdate=false ${{ matrix.electron-arch-overrides }} + args: ${{ matrix.electron-arch-overrides }} env: # macOS notarization API key From 6d987e4b7977da3fe81a867b67b55cb0dbc72dab Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 15 Jun 2022 13:58:45 +0100 Subject: [PATCH 4/7] ci: don't build macos in parallel It will fail when releasing the auto update information. --- .github/workflows/build.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37a59916a5..281435c482 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -167,15 +167,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, windows-latest] - electron-arch-overrides: [""] - # Separate out the arm64 macos build, those are the longest builds. - # package.json still includes configuration to build both targets. - include: - - os: macos-latest - electron-arch-overrides: "-c.mac.target.target=dmg -c.mac.target.arch=x64" - - os: macos-latest - electron-arch-overrides: "-c.mac.target.target=dmg -c.mac.target.arch=arm64" + os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v2 @@ -213,8 +205,6 @@ jobs: # release the app after building release: ${{ startsWith(github.ref, 'refs/tags/v') }} - args: ${{ matrix.electron-arch-overrides }} - env: # macOS notarization API key API_KEY_ID: ${{ secrets.api_key_id }} From 0b081e89e65c033c0332a2c9a82bb1016494876f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 15 Jun 2022 14:02:34 +0100 Subject: [PATCH 5/7] build: bump to 2.1.0 range We're not releasing beta.0, the update script will create a beta.1 instead. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 540a07a048..06d3b435a9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Athens", "author": "athensresearch", - "version": "2.0.0-beta.37", + "version": "2.1.0-beta.0", "description": "An open-source knowledege graph for research and notetaking", "repository": { "type": "git", From dcd8c370a9a9494cd3e8c3df60968d29e20614e0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 16 Jun 2022 18:58:38 +0100 Subject: [PATCH 6/7] v2.1.0-beta.1 --- CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6279588d20..1bc62bd070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,44 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.1.0-beta.1](https://github.com/athensresearch/athens/compare/v2.0.0-beta.37...v2.1.0-beta.1) (2022-06-16) + + +### Features + +* add context menu hook ([5c0b549](https://github.com/athensresearch/athens/commit/5c0b549e6ec49d7f6548f70c55a0b13b374d9a85)) +* anchor uses new context menu hook ([8c5423e](https://github.com/athensresearch/athens/commit/8c5423effb31d3708ce0bd1173c23001257f4300)) +* context menu also works on block container ([7c16441](https://github.com/athensresearch/athens/commit/7c164417b6e579936784c085bea8e58302fd0c4c)) + + +### Bug Fixes + +* defaultIsOpen state for linked refs ([59fbb60](https://github.com/athensresearch/athens/commit/59fbb6088471eda9f5915cd2729fdfd5c4c2fc03)) + + +### Enhancements + +* if a block open in right sidebar is not in main view, ([0ef8836](https://github.com/athensresearch/athens/commit/0ef8836f57e052b9e1be1c7f2292911e0b0b4290)) + + +### Refactors + +* **block:** use new contextmenu for blocks ([66a9d33](https://github.com/athensresearch/athens/commit/66a9d339b1701853885e403dde6edd0e536f46ca)) + + +### Documentation + +* add versioning ADR ([1c75e5f](https://github.com/athensresearch/athens/commit/1c75e5f53d266597baf409311092567a0710be2a)) + + +* bump to 2.1.0 range ([0b081e8](https://github.com/athensresearch/athens/commit/0b081e89e65c033c0332a2c9a82bb1016494876f)) +* deploy prerelease to beta domain ([f348a99](https://github.com/athensresearch/athens/commit/f348a99498411a09c70148a37885af74159fbbde)) +* docstrings ([ffca46a](https://github.com/athensresearch/athens/commit/ffca46aa42e9ec38a1f7df53b0ff2bc946a132ac)) +* docstrings ([15176d9](https://github.com/athensresearch/athens/commit/15176d93909e0c477873609b5bcf67beff8bdc66)) +* don't build macos in parallel ([6d987e4](https://github.com/athensresearch/athens/commit/6d987e4b7977da3fe81a867b67b55cb0dbc72dab)) +* fix ([492c362](https://github.com/athensresearch/athens/commit/492c362e00e226ea5ea027e5fbb96524c4e7beb3)) +* re-enable auto updates for electron ([ee29f33](https://github.com/athensresearch/athens/commit/ee29f3325f09801acd9b9cae3fb4af3cea6d5d4c)) + ## [2.0.0-beta.37](https://github.com/athensresearch/athens/compare/v2.0.0-beta.36...v2.0.0-beta.37) (2022-05-27) diff --git a/package.json b/package.json index 06d3b435a9..69bc20897d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Athens", "author": "athensresearch", - "version": "2.1.0-beta.0", + "version": "2.1.0-beta.1", "description": "An open-source knowledege graph for research and notetaking", "repository": { "type": "git", From f8a6bf06ed12dc4f9b0f5d158669b1c4c9aa68c6 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 16 Jun 2022 20:44:04 +0100 Subject: [PATCH 7/7] ci: prerelease comparison should be to a string --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 281435c482..18f0b1bddb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -150,7 +150,7 @@ jobs: scope: athens-research vercel-args: './vercel-release/' # Poor mans ternary operator https://github.com/actions/runner/issues/409#issuecomment-727565588 - alias-domains: ${{ env.PRERELEASE && env.PRERELEASE_DOMAIN || env.RELEASE_DOMAIN }} + alias-domains: ${{ env.PRERELEASE == 'true' && env.PRERELEASE_DOMAIN || env.RELEASE_DOMAIN }} env: PRERELEASE: ${{ contains(github.ref, '-alpha.') || contains(github.ref, '-beta.') || contains(github.ref, '-rc.')}} PRERELEASE_DOMAIN: beta.athensresearch.org