Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 20, 2024
2 parents b6ca618 + 3063494 commit dba337d
Show file tree
Hide file tree
Showing 122 changed files with 2,464 additions and 5,082 deletions.
1 change: 1 addition & 0 deletions .github/helpers/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ref=${6:-"develop"}
[ "$desk" == "talk" ] && from="talk" || from="desk"
folder=$ship/$desk

echo "Deploying $desk from $ref of $repo to $ship in $zone of $project"
set -e
set -o pipefail
cmdfile=$(mktemp "${TMPDIR:-/tmp/}janeway.XXXXXXXXX")
Expand Down
58 changes: 57 additions & 1 deletion .github/workflows/deploy-canary-groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,68 @@ on:
push:
branches:
- 'staging'
env:
tag: ${{ github.event.inputs.tag || 'staging' }}
jobs:
build-frontend:
runs-on: ubuntu-latest
name: 'Build Frontend'
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- uses: actions/setup-node@v3
with:
node-version-file: ./ui/.nvmrc
- working-directory: ./ui
run: |
npm ci
npm run build
- uses: actions/upload-artifact@v3
with:
name: 'ui-dist'
path: ui/dist
glob:
runs-on: ubuntu-latest
name: 'Make a glob'
needs: build-frontend
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- uses: actions/download-artifact@v3
with:
name: 'ui-dist'
path: ui/dist
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'glob'
uses: ./.github/actions/glob
with:
folder: 'ui/dist/*'
docket: 'desk/desk.docket-0'
- name: Commit and Push Glob
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
git add desk/desk.docket-0
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ env.tag }}
BRANCH=${INPUT:-"staging"}
git pull origin $BRANCH --rebase --autostash
git push
deploy:
runs-on: ubuntu-latest
name: "Release to ~binnec-dozzod-marnus (canary)"
needs: glob
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand All @@ -25,7 +81,7 @@ jobs:
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/landscape-apps groups binnec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ github.event.inputs.tag }}
./.github/helpers/deploy.sh tloncorp/landscape-apps groups binnec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ env.tag }}
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/deploy-groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ on:
push:
branches:
- 'develop'
env:
tag: ${{ github.event.inputs.tag || 'develop' }}
jobs:
build-frontend:
runs-on: ubuntu-latest
name: 'Build Frontend'
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
ref: ${{ env.tag }}
- uses: actions/setup-node@v3
with:
node-version-file: ./ui/.nvmrc
Expand All @@ -36,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
ref: ${{ env.tag }}
- uses: actions/download-artifact@v3
with:
name: 'ui-dist'
Expand All @@ -58,7 +60,7 @@ jobs:
git config --global user.email github-actions@github.com
git add desk/desk.docket-0
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ github.event.inputs.tag }}
INPUT=${{ env.tag }}
BRANCH=${INPUT:-"develop"}
git pull origin $BRANCH --rebase --autostash
git push
Expand All @@ -69,7 +71,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
ref: ${{ env.tag }}
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand All @@ -79,7 +81,7 @@ jobs:
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/landscape-apps groups wannec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ github.event.inputs.tag }}
./.github/helpers/deploy.sh tloncorp/landscape-apps groups wannec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ env.tag }}
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions desk/app/channels-server.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@
(put:on-v-posts:c posts.channel id ~ new)
::
%edit
?> =(src.bowl author.essay.c-post)
?> |(=(src.bowl author.essay.c-post) (is-admin:ca-perms src.bowl))
?> =(kind.nest -.kind-data.essay.c-post)
=/ post (get:on-v-posts:c posts.channel id.c-post)
?~ post `posts.channel
?~ u.post `posts.channel
?> =(src.bowl author.u.u.post)
?> |(=(src.bowl author.u.u.post) (is-admin:ca-perms src.bowl))
::TODO could optimize and no-op if the edit is identical to current
=/ new=v-post:c [-.u.u.post +(rev.u.u.post) essay.c-post]
:- `[%post id.c-post %set ~ new]
Expand Down Expand Up @@ -611,7 +611,7 @@
=/ reply (get:on-v-replies:c replies id.c-reply)
?~ reply `(put:on-v-replies:c replies id.c-reply ~)
?~ u.reply `replies
?> =(src.bowl author.u.u.reply)
?> |(=(src.bowl author.u.u.reply) (is-admin:ca-perms src.bowl))
:- `[%reply id.c-reply %set ~]
(put:on-v-replies:c replies id.c-reply ~)
::
Expand Down
92 changes: 9 additions & 83 deletions desk/app/chat.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
blocked=(set ship)
blocked-by=(set ship)
hidden-messages=(set id:c)
old-chats=(map flag:two:old:c chat:two:old:c) :: for migration
old-pins=(list whom:two:old:c)
old-chats=(map flag:old chat:old) :: for migration
old-pins=(list whom:old)
==
--
=| current-state
Expand Down Expand Up @@ -114,44 +114,14 @@
=+ !<([old=versioned-state cool=@ud] vase)
|-
?- -.old
%0 $(old (state-0-to-1 old))
%1 $(old (state-1-to-2 old))
%2 $(old (state-2-to-3 old))
%3 $(old (state-3-to-4 old))
%4 $(old (state-4-to-5 old))
%5 $(old (state-5-to-6 old))
%6 (emil(state old) (drop load:epos))
==
::
+$ versioned-state $%(current-state state-5 state-4 state-3 state-2 state-1 state-0)
+$ state-0
$: %0
chats=(map flag:zero chat:zero)
dms=(map ship dm:zero)
clubs=(map id:club:zero club:zero)
drafts=(map whom:zero story:zero)
pins=(list whom:zero)
bad=(set ship)
inv=(set ship)
voc=(map [flag:zero id:zero] (unit said:zero))
fish=(map [flag:zero @] id:zero)
:: true represents imported, false pending import
imp=(map flag:zero ?)
==
+$ state-1
$: %1
chats=(map flag:one chat:one)
dms=(map ship dm:one)
clubs=(map id:club:one club:one)
drafts=(map whom:one story:one)
pins=(list whom:one)
bad=(set ship)
inv=(set ship)
voc=(map [flag:one id:one] (unit said:one))
fish=(map [flag:one @] id:one)
:: true represents imported, false pending import
imp=(map flag:one ?)
==
+$ versioned-state $%(current-state state-5 state-4 state-3 state-2)
+$ state-2
$: %2
chats=(map flag:two chat:two)
Expand Down Expand Up @@ -209,16 +179,14 @@
blocked=(set ship)
blocked-by=(set ship)
hidden-messages=(set id:c)
old-chats=(map flag:two:old:c chat:two:old:c) :: for migration
old-pins=(list whom:two:old:c)
old-chats=(map flag:old chat:old) :: for migration
old-pins=(list whom:old)
==
+$ club-5 [heard:club:c remark=remark-5 =pact:c crew:club:c]
+$ dm-5 [=pact:c remark=remark-5 net:dm:c pin=_|]
+$ remark-5 [last-read=time watching=_| unread-threads=(set id:c)]
+$ state-6 current-state
++ zero zero:old:c
++ one one:old:c
++ two two:old:c
++ two old
++ three c
++ state-5-to-6
|= s=state-5
Expand Down Expand Up @@ -379,48 +347,6 @@
voc voc.s
chats chats.s
==
++ state-1-to-2
|= s=state-1
^- state-2
%* . *state-2
dms dms.s
clubs (clubs-1-to-2 clubs.s)
drafts drafts.s
pins pins.s
bad bad.s
inv inv.s
fish fish.s
voc voc.s
chats chats.s
==
::
++ clubs-1-to-2
|= clubs=(map id:club:one club:one)
^- (map id:club:two club:two)
%- ~(run by clubs)
|= =club:one
[*heard:club:two club]
::
++ state-0-to-1
|= s=state-0
^- state-1
%* . *state-1
dms dms.s
clubs (clubs-0-to-1 clubs.s)
drafts drafts.s
pins pins.s
bad bad.s
inv inv.s
fish fish.s
voc voc.s
chats chats.s
==
++ clubs-0-to-1
|= clubs=(map id:club:zero club:zero)
^- (map id:club:one club:one)
%- ~(run by clubs)
|= =club:zero
[*remark:one club]
--
::
++ poke
Expand Down Expand Up @@ -850,7 +776,7 @@
++ from-self =(our src):bowl
++ migrate
|%
++ t two:old:c
++ t old
++ server
=/ server-channels=v-channels:d
%+ convert-channels &
Expand Down Expand Up @@ -907,9 +833,9 @@
::
++ trim
=- =. old-chats - cor
^- (map flag:two:old:c chat:two:old:c)
^- (map flag:old chat:old)
%- ~(run by old-chats)
|= old-chat=chat:two:old:c
|= old-chat=chat:old
=/ citations=(set [ship time])
%- sy
^- (list [ship time])
Expand Down
30 changes: 1 addition & 29 deletions desk/app/diary.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
=+ !<([old=versioned-state cool=epic:e] vase)
|-
?- -.old
%0 $(old (state-0-to-1 old))
%1 $(old (state-1-to-2 old))
::
%2
Expand All @@ -115,14 +114,7 @@
$(diaries t.diaries)
==
::
+$ versioned-state $%(current-state state-0 state-1)
+$ state-0
$: %0
shelf=shelf:zero
voc=(map [flag:zero plan:zero] (unit said:zero))
:: true represents imported, false pending import
imp=(map flag:zero ?)
==
+$ versioned-state $%(current-state state-1)
+$ state-1
$: %1
=shelf:d
Expand All @@ -131,7 +123,6 @@
imp=(map flag:d ?)
==
+$ state-2 current-state
++ zero zero:old:d
++ state-1-to-2
|= s=state-1
^- state-2
Expand All @@ -142,25 +133,6 @@
imp imp.s
==
::
++ state-0-to-1
|= s=state-0
^- state-1
%* . *state-1
shelf (convert-shelf shelf.s)
voc voc.s
imp imp.s
==
::
++ convert-shelf
|= old-shelf=shelf:zero
^- shelf:d
%- malt
%+ turn
~(tap by old-shelf)
|= [=flag:d old-diary=diary:zero]
^- [flag:d diary:d]
[flag [~ old-diary]]
::
++ restore-missing-subs
%+ roll
~(tap by shelf)
Expand Down

0 comments on commit dba337d

Please sign in to comment.