add feed
This commit is contained in:
25
install.zsh
25
install.zsh
@@ -1,7 +1,9 @@
|
||||
#!/bin/zsh
|
||||
|
||||
function at-repos-env() {
|
||||
APP_PASSWORD=xxx
|
||||
host=syu.is
|
||||
handle=ai.syui.ai
|
||||
did=did:plc:6qyecktefllvenje24fcxnie
|
||||
repos=(
|
||||
"https://github.com/did-method-plc/did-method-plc"
|
||||
@@ -20,6 +22,7 @@ function at-repos-env() {
|
||||
"bgs"
|
||||
"ozone"
|
||||
"social-app"
|
||||
"feed"
|
||||
)
|
||||
handles=(
|
||||
"syui.syui.ai"
|
||||
@@ -51,6 +54,7 @@ PATCH_FILES=(
|
||||
"140-social-app-yarn-network-timeout.patch"
|
||||
"130-atproto-ozone-enable-daemon-v2.patch"
|
||||
"190-bgs-disable-ratelimit.patch"
|
||||
"200-feed-generator-custom.patch"
|
||||
)
|
||||
|
||||
function at-repos-clone() {
|
||||
@@ -78,7 +82,7 @@ function at-repos-pull() {
|
||||
echo $repo
|
||||
if [ -d $d/repos/${repo##*/} ];then
|
||||
cd $d/repos/${repo##*/}
|
||||
git stash
|
||||
git stash -u
|
||||
if ! git pull;then
|
||||
rm -rf $d/repos/${repo##*/}
|
||||
at-repos-clone
|
||||
@@ -249,6 +253,8 @@ function at-repos-patch-apply-all() {
|
||||
repo="atproto"
|
||||
elif [[ $filename == *"indigo"* || $filename == *"bgs"* ]]; then
|
||||
repo="indigo"
|
||||
elif [[ $filename == *"feed"* ]]; then
|
||||
repo="feed-generator"
|
||||
fi
|
||||
|
||||
patch-apply "$title" "$repo" "$filename"
|
||||
@@ -337,7 +343,7 @@ function at-repos-push-docker() {
|
||||
service=${services[$i]}
|
||||
docker tag at-${service}:latest localhost:${dport}/${service}:latest
|
||||
docker push localhost:${dport}/${service}:latest
|
||||
if [ "$service" == "ozone" ]];then
|
||||
if [ "$service" == "ozone" ];then
|
||||
docker tag at-${service}-web:latest localhost:${dport}/${service}-web:latest
|
||||
docker push localhost:${dport}/${service}-web:latest
|
||||
fi
|
||||
@@ -406,6 +412,15 @@ function at-repos-reset-bgs-db() {
|
||||
done
|
||||
}
|
||||
|
||||
function at-repos-feed-generator-start-push() {
|
||||
cd $d/repos/feed-generator
|
||||
yarn install
|
||||
FEEDGEN_HANDLE=${handle}
|
||||
FEEDGEN_PASSWORD=${APP_PASSWORD}
|
||||
FEEDGEN_RECORD_NAME=app
|
||||
npx tsx scripts/publish.ts
|
||||
}
|
||||
|
||||
at-repos-env
|
||||
case "$1" in
|
||||
pull)
|
||||
@@ -436,11 +451,15 @@ case "$1" in
|
||||
cd $d;docker compose down
|
||||
exit
|
||||
;;
|
||||
feed-push)
|
||||
at-repos-feed-generator-start-push
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
case "`cat /etc/hostname`" in
|
||||
at)
|
||||
if [ "$1" = "reset-bgs-db" ];then
|
||||
if [ "$1" = "bgs-reset" ];then
|
||||
at-repos-reset-bgs-db
|
||||
exit
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user