Skip to content

Commit

Permalink
Merge pull request #3318 from tloncorp/staging-5-8-0
Browse files Browse the repository at this point in the history
ops: version bump and promote to staging
  • Loading branch information
arthyn authored Mar 8, 2024
2 parents 5652590 + 278d66a commit 40a4247
Show file tree
Hide file tree
Showing 265 changed files with 24,187 additions and 18,294 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/deploy-canary-talk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Deploy Talk (canary)
on:
workflow_dispatch:
inputs:
tag:
type: string
required: false
description: Enter the tag to deploy
default: v5.6.0
env:
tag: ${{ github.event.inputs.tag || 'v5.6.0' }}
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:chat
- 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: 'talk/desk.docket-0'
- name: Commit and Push Glob
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
git add talk/desk.docket-0
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
sleep 10
INPUT=${{ env.tag }}
BRANCH=${INPUT:-"v5.6.0"}
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:
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/landscape-apps talk 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 }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
12 changes: 6 additions & 6 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Development

These instructions are for working on Groups as a developer at Tlon.
These instructions are for working on the Tlon app as a developer at Tlon.

## Project Structure

- `/desk`: The folder containing the desk for Groups. This currently contains the agents for all other apps.
- `/desk`: The folder containing the desk for %groups. This currently contains the agents necessary for the Tlon app.

- `/apps/tlon-web`: Groups is built primarily using [React], [Typescript], and [Tailwind CSS]. [Vite] ensures that all code and assets are loaded appropriately, bundles the application for distribution and provides a functional dev environment.
- `/apps/tlon-web`: Tlon is built primarily using [React], [Typescript], and [Tailwind CSS]. [Vite] ensures that all code and assets are loaded appropriately, bundles the application for distribution and provides a functional dev environment.

## Getting Started

To get started using Groups, run `npm install` in the root directory.
To get started working on Tlon, run `npm install` in the root directory.

To develop, you'll need a running ship to point to. To do so you first need to add a `.env.local` file to the `apps/tlon-web` directory. This file will not be committed. Adding `VITE_SHIP_URL={URL}` (where **{URL}** is the URL of the ship you would like to point to) will allow you to run `npm run dev`. This will proxy all requests to the ship except for those powering the interface, which lets you work with live data.

Expand Down Expand Up @@ -59,13 +59,13 @@ Since %groups has already been released and is now in the pill. It is very unlik
7. Commit and install landscape on local `~zod`:
1. `|commit %landscape`
2. `|install our %landscape`
8. Similarly commit and install Groups:
8. Similarly commit and install Tlon:
1. `|commit %groups`
2. `|install our %groups`

## Deploying

Groups is distributed via the Urbit network by way of a [glob](https://developers.urbit.org/reference/additional/dist/glob#-make-glob), or a Landscape application bundle. Instructions are as follows:
Tlon is distributed via the Urbit network by way of a [glob](https://developers.urbit.org/reference/additional/dist/glob#-make-glob), or a Landscape application bundle. Instructions are as follows:

1. Run `npm run build` in the `apps/tlon-web` directory, which outputs to `/dist`.
2. Create or launch an urbit using the -F flag.
Expand Down
2 changes: 1 addition & 1 deletion apps/tlon-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
compileSdk rootProject.ext.compileSdkVersion
versionCode 45
versionCode 48
versionName "4.0.0"

buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
Expand Down
3 changes: 3 additions & 0 deletions apps/tlon-mobile/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
-keep class com.swmansion.reanimated.** { *; }
-keep class com.facebook.react.turbomodule.** { *; }

# realm
-keep class io.realm.react.**

# Add any project specific keep options here:
1 change: 0 additions & 1 deletion apps/tlon-mobile/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<queries>
<intent>
<action android:name="android.intent.action.VIEW"/>
Expand Down
6 changes: 4 additions & 2 deletions apps/tlon-mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
defaultPriorityToken: process.env.DEFAULT_PRIORITY_TOKEN,
recaptchaSiteKeyAndroid: process.env.RECAPTCHA_SITE_KEY_ANDROID,
recaptchaSiteKeyIOS: process.env.RECAPTCHA_SITE_KEY_IOS,
devLocal: Boolean(process.env.DEV_LOCAL),
devLocalCode: process.env.DEV_LOCAL_CODE,
},
ios: {
runtimeVersion: '4.0.0',
buildNumber: '45',
buildNumber: '48',
config: {
usesNonExemptEncryption: false,
},
},
android: {
runtimeVersion: '4.0.0',
versionCode: 45,
versionCode: 48,
},
updates: {
url: `https://u.expo.dev/${projectId}`,
Expand Down
50 changes: 46 additions & 4 deletions apps/tlon-mobile/ios/Landscape.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@
CLANG_DEBUG_INFORMATION_LEVEL = "DWARF with dSYM File";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Landscape/Landscape.entitlements;
CURRENT_PROJECT_VERSION = 45;
CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_TEAM = XU9PR2N722;
DISPLAY_NAME = Tlon;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -947,7 +947,7 @@
CLANG_DEBUG_INFORMATION_LEVEL = "DWARF with dSYM File";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Landscape/Landscape.entitlements;
CURRENT_PROJECT_VERSION = 45;
CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_TEAM = XU9PR2N722;
DISPLAY_NAME = Tlon;
INFOPLIST_FILE = Landscape/Info.plist;
Expand Down Expand Up @@ -979,7 +979,7 @@
CLANG_DEBUG_INFORMATION_LEVEL = "DWARF with dSYM File";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Landscape/Landscape.entitlements;
CURRENT_PROJECT_VERSION = 45;
CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_TEAM = XU9PR2N722;
DISPLAY_NAME = "Tlon - Preview";
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1018,7 +1018,7 @@
CLANG_DEBUG_INFORMATION_LEVEL = "DWARF with dSYM File";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Landscape/Landscape.entitlements;
CURRENT_PROJECT_VERSION = 45;
CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_TEAM = XU9PR2N722;
DISPLAY_NAME = "Tlon - Preview";
INFOPLIST_FILE = Landscape/Info.plist;
Expand Down Expand Up @@ -1177,6 +1177,27 @@
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
);
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -1250,6 +1271,27 @@
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
);
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
6 changes: 6 additions & 0 deletions apps/tlon-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,8 @@ PODS:
- React-jsi (= 0.73.4)
- React-logger (= 0.73.4)
- React-perflogger (= 0.73.4)
- RealmJS (12.6.0):
- React
- recaptcha-enterprise-react-native (18.4.0):
- React-Core
- RecaptchaEnterprise (= 18.4.0)
Expand Down Expand Up @@ -1289,6 +1291,7 @@ DEPENDENCIES:
- React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`)
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- RealmJS (from `../../../node_modules/realm`)
- "recaptcha-enterprise-react-native (from `../../../node_modules/@google-cloud/recaptcha-enterprise-react-native`)"
- "RNCAsyncStorage (from `../../../node_modules/@react-native-async-storage/async-storage`)"
- RNDeviceInfo (from `../../../node_modules/react-native-device-info`)
Expand Down Expand Up @@ -1468,6 +1471,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/react/utils"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
RealmJS:
:path: "../../../node_modules/realm"
recaptcha-enterprise-react-native:
:path: "../../../node_modules/@google-cloud/recaptcha-enterprise-react-native"
RNCAsyncStorage:
Expand Down Expand Up @@ -1579,6 +1584,7 @@ SPEC CHECKSUMS:
React-runtimescheduler: 1c054b58fef2ce74cdcbdcd70db190e10f56a617
React-utils: 21a798438d45e70ed9c2e2fe0894ee32ba7b7c5b
ReactCommon: dcc65c813041388dead6c8b477444757425ce961
RealmJS: a62dc7a1f94b888fe9e8712cd650167ad97dc636
recaptcha-enterprise-react-native: 7d63c5bdde3b48996b984a86ac2b536a1d8f5f16
RecaptchaEnterprise: dc302910b77963a0cc6f6908407e30b35268a755
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
Expand Down
4 changes: 4 additions & 0 deletions apps/tlon-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
"@react-navigation/bottom-tabs": "^6.5.12",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@realm/react": "^0.6.2",
"@tloncorp/shared": "*",
"@urbit/aura": "^1.0.0",
"classnames": "^2.3.2",
"dotenv-expand": "^11.0.6",
"expo": "^50.0.6",
"expo-application": "~5.8.3",
"expo-asset": "~9.0.2",
Expand Down Expand Up @@ -70,7 +72,9 @@
"react-native-screens": "~3.29.0",
"react-native-storage": "^1.0.1",
"react-native-svg": "^14.1.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-webview": "13.6.4",
"realm": "^12.6.0",
"tailwind-rn": "^4.2.0"
},
"devDependencies": {
Expand Down
36 changes: 25 additions & 11 deletions apps/tlon-mobile/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ import { SafeAreaProvider } from 'react-native-safe-area-context';
import { useTailwind } from 'tailwind-rn';

import { LoadingSpinner } from './components/LoadingSpinner';
import { DEV_LOCAL, DEV_LOCAL_CODE } from './constants';
import { ShipProvider, useShip } from './contexts/ship';
import * as db from './db';
import { useDeepLink } from './hooks/useDeepLink';
import { useIsDarkMode } from './hooks/useIsDarkMode';
import { useScreenOptions } from './hooks/useScreenOptions';
import { inviteShipWithLure } from './lib/hostingApi';
import { syncContacts } from './lib/sync';
import { useDevTools } from './lib/useDevTools';
import { TabStack } from './navigation/TabStack';
import { CheckVerifyScreen } from './screens/CheckVerifyScreen';
import { EULAScreen } from './screens/EULAScreen';
Expand All @@ -38,6 +42,7 @@ import { TlonLoginScreen } from './screens/TlonLoginScreen';
import { WelcomeScreen } from './screens/WelcomeScreen';
import type { OnboardingStackParamList } from './types';
import { posthogAsync, trackError } from './utils/posthog';
import { getPathFromWer } from './utils/string';

type Props = {
wer?: string;
Expand All @@ -46,14 +51,21 @@ type Props = {
const OnboardingStack = createNativeStackNavigator<OnboardingStackParamList>();

const App = ({ wer: initialWer }: Props) => {
useDevTools({ enabled: DEV_LOCAL, localCode: DEV_LOCAL_CODE });
const isDarkMode = useIsDarkMode();
const tailwind = useTailwind();
const { isLoading, isAuthenticated, ship } = useShip();
const [connected, setConnected] = useState(true);
const { wer, lure, priorityToken, clearDeepLink } = useDeepLink();
const navigation = useNavigation();
const screenOptions = useScreenOptions();
const gotoPath = wer ?? initialWer;
const gotoPath = initialWer ? getPathFromWer(initialWer) : wer;

useEffect(() => {
if (isAuthenticated) {
syncContacts();
}
}, [isAuthenticated]);

useEffect(() => {
const unsubscribeFromNetInfo = NetInfo.addEventListener(
Expand Down Expand Up @@ -223,17 +235,19 @@ const App = ({ wer: initialWer }: Props) => {
);
};

export default function AnalyticsApp(props: Props) {
export default function ConnectedApp(props: Props) {
const isDarkMode = useIsDarkMode();
return (
<TamaguiProvider>
<ShipProvider>
<NavigationContainer theme={isDarkMode ? DarkTheme : DefaultTheme}>
<PostHogProvider client={posthogAsync} autocapture>
<App {...props} />
</PostHogProvider>
</NavigationContainer>
</ShipProvider>
</TamaguiProvider>
<db.RealmProvider>
<TamaguiProvider defaultTheme={isDarkMode ? 'dark' : 'light'}>
<ShipProvider>
<NavigationContainer theme={isDarkMode ? DarkTheme : DefaultTheme}>
<PostHogProvider client={posthogAsync} autocapture>
<App {...props} />
</PostHogProvider>
</NavigationContainer>
</ShipProvider>
</TamaguiProvider>
</db.RealmProvider>
);
}
Loading

0 comments on commit 40a4247

Please sign in to comment.