-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chm のビルド前に chm ファイルを削除する #774
chm のビルド前に chm ファイルを削除する #774
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
とくに問題ないと思います。
今後の課題ですが、リファクタリングは「何をどうした」のか書いておくと後で悩まなくて済むと思います。
@@ -8,34 +8,29 @@ set HHP_MACRO=help\macro\macro.HHP | |||
set HHP_PLUGIN=help\plugin\plugin.hhp | |||
set HHP_SAKURA=help\sakura\sakura.hhp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント) パスは空白を含まない・・・
) | ||
set CHM_MACRO=help\macro\macro.chm | ||
set CHM_PLUGIN=help\plugin\plugin.chm | ||
set CHM_SAKURA=help\sakura\sakura.chm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント) パスは空白を含まない・・・
) | ||
call :BuildChm %HHP_MACRO% %CHM_MACRO% || (echo error && exit /b 1) | ||
call :BuildChm %HHP_PLUGIN% %CHM_PLUGIN% || (echo error && exit /b 1) | ||
call :BuildChm %HHP_SAKURA% %CHM_SAKURA% || (echo error && exit /b 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント) 構造は call :BuildChm( str, str )
。
引数1と引数2は "%Variable%"
とするのがベター。
利用シーンで空白を含まないことが分かっているので対応は不要。
@@ -23,14 +23,19 @@ exit /b 0 | |||
:BuildChm | |||
set PROJECT_HHP=%1 | |||
set PROJECT_CHM=%2 | |||
|
|||
if exist "%PROJECT_CHM%" del /F "%PROJECT_CHM%" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント) 削除が成功したとき(通常は削除が行われない)に「1個のファイルを削除しました(英語」が出ますね。ファイル名が出ないので、ハマるときはこういうのでもハマりそう。問題ないと思いますが。
@rem hhc.exe returns 1 on success, and returns 0 on failure | ||
"%CMD_HHC%" %PROJECT_HHP% | ||
if not errorlevel 1 ( | ||
echo error %PROJECT_HHP% errorlevel %errorlevel% | ||
|
||
del /F "%PROJECT_CHM%" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント) ファイル削除後のエラーチェックはしないんですね 😄
マージしちゃいます |
コメント全スルーかいっ!w(いいけど。 |
approve されたし、ま、いいかと |
…handling-chm chm のビルド前に chm ファイルを削除する
chm のビルド前に chm ファイルを削除する
作業しやすいように最初の commit でリファクリタングしてから、対応を入れています。