fix: 修正配置目录路径并清理过时命令
This commit is contained in:
@@ -1,52 +0,0 @@
|
|||||||
---
|
|
||||||
description: Build and release Android APK to Gitea (generic for any Android project)
|
|
||||||
---
|
|
||||||
|
|
||||||
# Android Release Command
|
|
||||||
|
|
||||||
Build Android APK and upload to Gitea Release for the current directory's Android project.
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
Before running this command:
|
|
||||||
|
|
||||||
1. **Create and push the git tag first** (e.g., `myapp-1.0.0`, `android-1.0.0`, or `v1.0.0`)
|
|
||||||
2. Ensure `GITEA_API_TOKEN` environment variable is set
|
|
||||||
3. Ensure Android project exists in current directory
|
|
||||||
|
|
||||||
Check the environment:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Check GITEA_API_TOKEN
|
|
||||||
echo "GITEA_API_TOKEN: ${GITEA_API_TOKEN:+SET}"
|
|
||||||
|
|
||||||
# Check current directory for Android project
|
|
||||||
ls -la app/build.gradle.kts 2>/dev/null || ls -la android/app/build.gradle.kts 2>/dev/null || echo "No Android project found"
|
|
||||||
|
|
||||||
# Check recent tags (script will use the latest tag)
|
|
||||||
git tag -l | tail -10
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build and Upload
|
|
||||||
|
|
||||||
After creating and pushing the tag, run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
node ~/.opencode/bin/release-android.mjs
|
|
||||||
```
|
|
||||||
|
|
||||||
The script will:
|
|
||||||
- Auto-detect Android project root (standalone or monorepo)
|
|
||||||
- Auto-detect project name from recent git tags or directory name
|
|
||||||
- Auto-detect Gitea config from git remote URL (HTTPS/SSH)
|
|
||||||
- Auto-detect Java from Android Studio
|
|
||||||
- Build release APK
|
|
||||||
- Upload to Gitea Release matching the tag pattern
|
|
||||||
|
|
||||||
## Error Handling
|
|
||||||
|
|
||||||
- If `GITEA_API_TOKEN` is not set: `export GITEA_API_TOKEN="your_token"`
|
|
||||||
- If build fails: check Java/Android SDK installation
|
|
||||||
- If tag not found: create and push the tag first
|
|
||||||
|
|
||||||
$ARGUMENTS
|
|
||||||
@@ -16,7 +16,7 @@ When you updated OpenCode configuration on another device, or team members share
|
|||||||
### 1. Switch to OpenCode Config Directory
|
### 1. Switch to OpenCode Config Directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/.opencode
|
cd ~/.config/opencode
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Check Local Status
|
### 2. Check Local Status
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ Commit and push OpenCode configuration repository changes to remote repository.
|
|||||||
|
|
||||||
## Use Cases
|
## Use Cases
|
||||||
|
|
||||||
When you modified config files in `~/.opencode` directory (such as `command/`, `skill/`, `opencode.json`, etc.), use this command to sync changes to remote repository.
|
When you modified config files in `~/.config/opencode` directory (such as `command/`, `skill/`, `opencode.json`, etc.), use this command to sync changes to remote repository.
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
### 1. Switch to OpenCode Config Directory
|
### 1. Switch to OpenCode Config Directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/.opencode
|
cd ~/.config/opencode
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Check Change Status
|
### 2. Check Change Status
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ EMQX 容器名是 emqx,使用阿里云 DNS。请按照 setup-mqtts-acme skill
|
|||||||
```
|
```
|
||||||
|
|
||||||
**AI 响应流程:**
|
**AI 响应流程:**
|
||||||
1. 读取 `~/.opencode/skills/setup-mqtts-acme.md`
|
1. 读取 `~/.config/opencode/skill/setup-mqtts-acme.md`
|
||||||
2. 验证 DNS 解析
|
2. 验证 DNS 解析
|
||||||
3. 申请证书
|
3. 申请证书
|
||||||
4. 安装证书并配置自动更新
|
4. 安装证书并配置自动更新
|
||||||
|
|||||||
Reference in New Issue
Block a user