mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-26 01:35:53 +03:00
0dabb08217
## **Type**
enhancement
___
## **Description**
- Added a command to `.devcontainer/build.sh` to create a default user (`affine`) in the database for development purposes.
- Introduced error handling in `.devcontainer/setup-user.sh` to ensure the script stops on the first error.
- Modified the git fetch command in `.devcontainer/setup-user.sh` to fetch the `canary` branch from `origin` with a depth of 1, optimizing the setup process.
___
## **Changes walkthrough**
<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement
</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>build.sh</strong><dd><code>Add Default User Creation to Dev Container Build Script</code> </dd></summary>
<hr>
.devcontainer/build.sh
<li>Added command to create a default user with username and password <br>'affine'.<br> <li> Ensured database push command is followed by a newline.<br>
</details>
</td>
<td><a href="https:/toeverything/AFFiNE/pull/5917/files#diff-165b66803397b501866b23a0532418e9ad3eb2ab642274f9679383c76d18136f">+4/-1</a> </td>
</tr>
<tr>
<td>
<details>
<summary><strong>setup-user.sh</strong><dd><code>Enhance User Setup Script with Error Handling and Specific Git Fetch</code></dd></summary>
<hr>
.devcontainer/setup-user.sh
<li>Introduced error handling with 'set -e' to stop on first error.<br> <li> Modified 'git fetch' to specifically fetch 'canary' branch from <br>'origin' with depth of 1.<br>
</details>
</td>
<td><a href="https:/toeverything/AFFiNE/pull/5917/files#diff-8c5e76719e2ff0a3bf2b59d108dc9cf88bdae00c317728454cfa5108f2fc76af">+3/-1</a> </td>
</tr>
</table></td></tr></tr></tbody></table>
___
> ✨ **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
10 lines
177 B
Bash
Executable File
10 lines
177 B
Bash
Executable File
set -e
|
|
|
|
if [ -v GRAPHITE_TOKEN ];then
|
|
gt auth --token $GRAPHITE_TOKEN
|
|
fi
|
|
|
|
git fetch origin canary:canary --depth=1
|
|
git branch canary -t origin/canary
|
|
gt init --trunk canary
|