Browse Source

[desktop] RC (#1689)

- Whitelist uid
- electron 30.0.3
- Document log paths
Manav Rathi 1 năm trước cách đây
mục cha
commit
a4a5ea11cd

+ 5 - 8
desktop/docs/release.md

@@ -34,16 +34,15 @@ The workflow for making such "rc" builds is:
     gh workflow run desktop-release.yml
     ```
 
-We can do steps 2 and 3 multiple times; each time it'll just update the
+We can do steps 2 and 3 multiple times: each time it'll just update the
 artifacts attached to the same draft.
 
 ## Workflow - Release
 
-1.  Update `package.json` in the source repo to use version `1.x.x`. Create a
-    new draft release in the release repo with tag `v1.x.x`.
+1.  Update source repo to set version `1.x.x` in `package.json` and finialize
+    the CHANGELOG.
 
-2.  Push code to the `desktop/rc` branch in the source repo. Remember to update
-    update the CHANGELOG.
+2.  Push code to the `desktop/rc` branch in the source repo.
 
 3.  In the release repo
 
@@ -51,15 +50,13 @@ artifacts attached to the same draft.
     ./.github/trigger-release.sh v1.x.x
     ```
 
-4.  If the build is successful, tag `desktop/rc` and merge it into main:
+4.  If the build is successful, tag `desktop/rc` in the source repo.
 
     ```sh
     # Assuming we're on desktop/rc that just got build
 
     git tag photosd-v1.x.x
     git push origin photosd-v1.x.x
-
-    # Now open a PR to merge it into main
     ```
 
 ## Post build

+ 2 - 5
desktop/src/main/log.ts

@@ -5,11 +5,8 @@ import { isDev } from "./utils/electron";
 /**
  * Initialize logging in the main process.
  *
- * This will set our underlying logger up to log to a file named `ente.log`,
- *
- * - on Linux at ~/.config/ente/logs/ente.log
- * - on macOS at ~/Library/Logs/ente/ente.log
- * - on Windows at %USERPROFILE%\AppData\Roaming\ente\logs\ente.log
+ * This will set our underlying logger up to log to a file named `ente.log`, see
+ * [Note: App log path].
  *
  * On dev builds, it will also log to the console.
  */

+ 6 - 2
desktop/src/main/services/dir.ts

@@ -64,14 +64,18 @@ export const openLogDirectory = () => openDirectory(logDirectoryPath());
  * Note that Chromium also stores the browser state, e.g. localStorage or disk
  * caches, in userData.
  *
+ * https://www.electronjs.org/docs/latest/api/app
+ *
+ * [Note: App log path]
+ *
  * Finally, there is the "logs" directory. This is not within "appData" but has
  * a slightly different OS specific path. Since our log file is named
  * "ente.log", it can be found at:
  *
  * - macOS: ~/Library/Logs/ente/ente.log (production)
  * - macOS: ~/Library/Logs/Electron/ente.log    (dev)
- *
- * https://www.electronjs.org/docs/latest/api/app
+ * - Linux: ~/.config/ente/logs/ente.log
+ * - Windows: %USERPROFILE%\AppData\Roaming\ente\logs\ente.log
  */
 const logDirectoryPath = () => app.getPath("logs");
 

+ 12 - 7
desktop/yarn.lock

@@ -316,9 +316,9 @@
   integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==
 
 "@types/node@*", "@types/node@^20.9.0":
-  version "20.12.7"
-  resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384"
-  integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==
+  version "20.12.11"
+  resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.11.tgz#c4ef00d3507000d17690643278a60dc55a9dc9be"
+  integrity sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==
   dependencies:
     undici-types "~5.26.4"
 
@@ -1266,9 +1266,9 @@ electron-updater@^6.1:
     tiny-typed-emitter "^2.1.0"
 
 electron@^30:
-  version "30.0.2"
-  resolved "https://registry.yarnpkg.com/electron/-/electron-30.0.2.tgz#95ba019216bf8be9f3097580123e33ea37497733"
-  integrity sha512-zv7T+GG89J/hyWVkQsLH4Y/rVEfqJG5M/wOBIGNaDdqd8UV9/YZPdS7CuFeaIj0H9LhCt95xkIQNpYB/3svOkQ==
+  version "30.0.3"
+  resolved "https://registry.yarnpkg.com/electron/-/electron-30.0.3.tgz#7c25ddb12ba89fd117991d010f1b274b1bafcb73"
+  integrity sha512-h+suwx6e0fnv/9wi0/cmCMtG+4LrPzJZa+3DEEpxcPcP+pcWnBI70t8QspxgMNIh2wzXLMD9XVqrLkEbiBAInw==
   dependencies:
     "@electron/get" "^2.0.0"
     "@types/node" "^20.9.0"
@@ -2924,7 +2924,12 @@ semver@^6.2.0:
   resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
   integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
 
-semver@^7.3.2, semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.6.0:
+semver@^7.3.2:
+  version "7.6.2"
+  resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13"
+  integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==
+
+semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.6.0:
   version "7.6.0"
   resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d"
   integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==

+ 2 - 2
web/apps/photos/src/utils/user/index.ts

@@ -14,8 +14,8 @@ export const isInternalUser = () => {
 };
 
 export const isInternalUserForML = () => {
-    const userId = (getData(LS_KEYS.USER) as User)?.id;
-    if (userId == 1) return true;
+    const userID = (getData(LS_KEYS.USER) as User)?.id;
+    if (userID == 1 || userID == 2) return true;
 
     return isInternalUser();
 };