stop tracking wifi_config.h and update CI workflow#62
Closed
gsh1209 wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a template for WiFi configuration, updates the .gitignore to exclude local configuration files, and adds compilation instructions to the README. Feedback indicates that the CI workflow may need updates to handle the new file structure to prevent build failures and suggests untracking the existing configuration file from the Git index to ensure the ignore rules are effective.
|
|
||
| 需要在`Arduino IDE`中安装ESP32开发板支持,参考[官方文档](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html),版型选`MakerGO ESP32 C3 SuperMini`。 | ||
|
|
||
| ## 软件编译 |
| 克隆仓库后,复制 WiFi 信息配置文件模板,并填入 WiFi SSID 和 WiFi 密码: | ||
|
|
||
| ```bash | ||
| cp code/wifi_config.h.example code/wifi_config.h |
Signed-off-by: gsh1209 <gsh1209@outlook.com>
82b583d to
3320344
Compare
Contributor
Author
|
awesome bot😂 |
Owner
|
想法很好,但我还是希望这个工程可以做到开箱即用
一般用户来说没有往这个仓库推送代码的需求,会改代码来贡献的人还是占少数,大部分人只是克隆-修改-直接用
多这么一个步骤,会给大部分人带来不便
…---Original---
From: ***@***.***>
Date: Sat, Apr 18, 2026 15:03 PM
To: ***@***.***>;
Cc: ***@***.***>;
Subject: [chenxuuu/sms_forwarding] stop tracking wifi_config.h and update CI workflow (PR #62)
问题:
Commit f4224f8 中用 .gitignore 排除了 wifi_config.h,但该规则只对未追踪(untracked)的文件生效,一旦文件曾经被 git add 过,Git 就会持续追踪它的变更,忽略规则无效。
修改:
停止追踪文件 wifi_config.h;
引入配置模板 wifi_config.h.example,保留原配置文件需要用户填写的信息;
增加 README 编译说明,增加 cp wifi_config.h.example wifi_config.h 的 CI 流程。
You can view, comment on, or merge this pull request online at:
#62
Commit Summary
82b583d feat: stop tracking wifi_config.h and update CI workflow
File Changes
(4 files)
M .github/workflows/build.yml (4)
M .gitignore (1)
M README.md (8)
A code/wifi_config.h.example (3)
Patch Links:
https://github.com/chenxuuu/sms_forwarding/pull/62.patch
https://github.com/chenxuuu/sms_forwarding/pull/62.diff
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Contributor
Author
|
👌👌 |
Owner
|
如果可以做到自动检测是否包含这个头文件,做到开箱即用的话,其实也可以 |
Contributor
Author
|
想不到更直接的方案了,保持现状吧。
我的初衷是强迫症不想看到config文件总是被提示modified,也防止不小心把ssid/password push上去,
检测是否包含头文件可以在 ino 文件里用 #if __has_include,大概是这样:
#if __has_include("wifi_config.h")
#include "wifi_config.h"
#else
#define WIFI_SSID "YOUR_WIFI_SSID"
#define WIFI_PASS "YOUR_WIFI_PASSWORD"
#endif
这就有点诡异,如果有人图方便直接修改 #define WIFI_PASS,问题仍然存在。
…________________________________
发件人: chenxuuu ***@***.***>
发送时间: 2026年4月20日 10:54
收件人: chenxuuu/sms_forwarding ***@***.***>
抄送: gsh1209 ***@***.***>; State change ***@***.***>
主题: Re: [chenxuuu/sms_forwarding] stop tracking wifi_config.h and update CI workflow (PR #62)
[https://avatars.githubusercontent.com/u/10357394?s=20&v=4]chenxuuu left a comment (chenxuuu/sms_forwarding#62)<#62?email_source=notifications&email_token=A3EE7QGTMZREIOVMAOWHO5L4WWGMTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRXG42TKMZTG4ZKM4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4277553372>
如果可以做到自动检测是否包含这个头文件,做到开箱即用的话,其实也可以
―
Reply to this email directly, view it on GitHub<#62?email_source=notifications&email_token=A3EE7QGTMZREIOVMAOWHO5L4WWGMTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRXG42TKMZTG4ZKM4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4277553372>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A3EE7QEXXC2CGBFZ5QGFLBL4WWGMTAVCNFSM6AAAAACX5XUBK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DENZXGU2TGMZXGI>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题:
Commit f4224f8 中用 .gitignore 排除了
wifi_config.h,但该规则只对未追踪(untracked)的文件生效,一旦文件曾经被 git add 过,Git 就会持续追踪它的变更,忽略规则无效。修改:
wifi_config.h;wifi_config.h.example,保留原配置文件需要用户填写的信息;cp wifi_config.h.example wifi_config.h的 CI 流程。