Skip to content
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

3.2.130 #290

Merged
merged 51 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5b8b27b
✨ tinytask runs eval not expression #261
trydofor Jun 24, 2024
f5e2bc1
🦁 May the False be with you
trydofor Jun 24, 2024
909a385
✨ conf_runtime size and enable #262
trydofor Jun 25, 2024
d4bfb5c
✨ CacheTemplate to programmatic cache #264
trydofor Jun 26, 2024
a2d3f49
✨ add Started/Elapsed time to starter
trydofor Jun 26, 2024
4f7feee
✨ conf_runtime outline type #262
trydofor Jun 27, 2024
93bca81
🧑‍💻 improve log and doc
trydofor Jun 28, 2024
f64bac6
✨ tiny-mail with runs-not #261
trydofor Jun 28, 2024
b8832a7
🧑‍💻 add git-info to starter
trydofor Jun 28, 2024
3b8a8e2
💥keep silencer simple #265
trydofor Jun 28, 2024
ccb70bc
🎨 tiny-mail IfSetter sugar
trydofor Jul 2, 2024
adecb9b
💥 JournalService elapse, alive #266
trydofor Jul 3, 2024
a3d85ba
✨ Prop Resource with optional #267
trydofor Jul 4, 2024
8cff460
✨ prepared method to subclass-init helper #268
trydofor Jul 5, 2024
e606e6a
✨ inspect DatabaseChecker revision #259
trydofor Jul 6, 2024
170c378
✨ flywave PROCEDURE for revi #269
trydofor Jul 7, 2024
c8f9f46
🎨 fit-revi logger, prop poly
trydofor Jul 8, 2024
deaf97b
✨ tinymail use its own scheduler #271
trydofor Jul 9, 2024
e2f316d
✨ tinymail add scan-idle #271
trydofor Jul 10, 2024
d5ca548
✨ tinymail support lazy edit #270
trydofor Jul 12, 2024
0fbd5fe
💥tinymail service refactor #272
trydofor Jul 14, 2024
df6ed7e
✅ tinymail unittest #272
trydofor Jul 15, 2024
93a1045
✨ tinymail lazy stop sending #273
trydofor Jul 16, 2024
262e598
🎨 avoid circular reference #270
trydofor Jul 17, 2024
30c0800
💚 get rid of Qodana warning
trydofor Jul 18, 2024
a32c3a2
♻️ change ApiAuth signature, compatible to session level #274
trydofor Jul 19, 2024
7ae3677
🎨 table num, tiny deps, docs
trydofor Jul 23, 2024
85cf145
✨ optimise log monitor with stracktrace #277
trydofor Jul 23, 2024
79436d5
✨ disable oss repo in some case #279
trydofor Jul 24, 2024
5778aa6
✨ tiny-grow to track data, analyze grow #275
trydofor Jul 27, 2024
6de62ea
✨ Anno omit, Helper, Docs #275
trydofor Jul 29, 2024
70dcdc5
✨ tinymail solidify prop at insert #280
trydofor Jul 30, 2024
90ce653
🚨 1681 Integer display width is deprecated #278
trydofor Jul 31, 2024
fd0e175
✨ auto gen metadata.json #281
trydofor Aug 1, 2024
2b63203
🧑‍💻 tiny/task,grow optimization #282
trydofor Aug 2, 2024
f0227f0
♻️ executor should shutdown if kill #283
trydofor Aug 3, 2024
e0330bc
💥 tinytask redefine miss/beat #284
trydofor Aug 4, 2024
9e63d82
🚨 fix qodana lint #284
trydofor Aug 4, 2024
3790207
♻️ executor shutdown quickly and now #283
trydofor Aug 5, 2024
6d7d3f5
🐛 typo var of track addr #282
trydofor Aug 6, 2024
49493bd
⬆️ bump boot to 3.2.8 #285
trydofor Aug 7, 2024
6805f6a
🧑‍💻 optimize starter/release shell #286
trydofor Aug 8, 2024
27537ee
🔊 suppress warn of common task #287
trydofor Aug 9, 2024
de675a9
📈 opt task/cron time #288
trydofor Aug 10, 2024
bfb95be
🩺 health check with run-mode #284
trydofor Aug 12, 2024
fc0c41f
🧑‍💻 starter.sh status wings git info #286
trydofor Aug 13, 2024
0c75d23
🩺 log monitor support error section
trydofor Aug 16, 2024
828298a
🧑‍💻 release.sh use pull --force #286
trydofor Aug 16, 2024
24e6a77
✨ Watching collect to mail #289
trydofor Aug 27, 2024
9a364ce
🚸 LogView ignore preview if no keywords #241
trydofor Aug 28, 2024
a5144e3
🔖 3.2.130
trydofor Aug 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
labels: [ "feature" ]
- title: "🐞 Bug Fixes"
labels: [ "bug" ]
- title: "💥 Breaking Change"
labels: [ "break" ]
- title: "💎 Enhancements"
labels: [ "better", "devops", "quality" ]
- title: "📝 Documentation"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ jobs:
</settings>
EOF
- name: Qodana Scan
uses: JetBrains/qodana-action@v2023.3
uses: JetBrains/qodana-action@v2024.1
if: steps.settings.outputs.QODANA_SCAN == 'true'
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
## report if not release
- name: Test Coverage ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: steps.settings.outputs.MVN_COVERAGE == 'true'
run: |
mvn -P '!module-example,!module-devs' -Dmaven.test.skip=true clean install
mvn -P 'repo-snapshot,!module-example,!module-devs' -Dmaven.test.skip=true clean install
mvn -pl ':devs-codegen' -Ddevs-initdb=true clean test
mvn -P 'report-coverage,!module-example,!module-devs' -Dmaven.test.failure.ignore=$TESTFAILS_IGNORE test
mvn -P 'report-coverage' -pl ':devs-coverage' -am jacoco:report-aggregate
Expand All @@ -181,7 +181,7 @@ jobs:
if: steps.settings.outputs.MVN_DEPLOY_OSSRH == 'true'
run: >
mvn
-P 'deploy,deploy-oss,!module-example,!module-devs'
-P 'repo-snapshot,deploy,deploy-oss,!module-example,!module-devs'
${{ steps.settings.outputs.MVN_REVISION }}
-Dgpg.passphrase=${MVN_GPG_PASS}
-Dorg.slf4j.simpleLogger.log.lombok=WARN
Expand All @@ -200,7 +200,7 @@ jobs:
continue-on-error: ${{ inputs.deployAltrh != 'true' }}
run: >
mvn
-P 'deploy,deploy-alt,deploy-old,!module-example,!module-devs'
-P 'repo-snapshot,deploy,deploy-alt,deploy-old,!module-example,!module-devs'
${{ steps.settings.outputs.MVN_REVISION }}
-Dgpg.passphrase=${MVN_GPG_PASS}
-Dorg.slf4j.simpleLogger.log.lombok=WARN
Expand Down
10 changes: 10 additions & 0 deletions WingsBoot.t.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Use `t.md` as local [Test Management](https://www.jetbrains.com/help/idea/test-m
* 11033 ThisLazyCglibTest: thisLazy with cglib
* 11034 ThisLazyProxyTest: thisLazy with default jdk proxy
* 11035 TypedClassTest: ResolvableType sugar
* 11036 CommonPropHelperTest: comma delimited string
* 11037 CommonPropHelperTest: resource string

## 12 Faceless

Expand Down Expand Up @@ -323,6 +325,7 @@ Use `t.md` as local [Test Management](https://www.jetbrains.com/help/idea/test-m
* 13125 JsonHelperCompatibleTest: jackson basic type compatible
* 13126 FastJsonTest: fastjson helper json path
* 13127 TypeReferenceTest: TypeReference, TypeDescriptor, ResolvableType
* 13128 LogViewerTest: only match header line

## 14 Warlock

Expand Down Expand Up @@ -411,6 +414,7 @@ Use `t.md` as local [Test Management](https://www.jetbrains.com/help/idea/test-m
* 14083 DatabaseShard0Test: clean and init shard_0 schema
* 14084 DatabaseShard1Test: clean and init shard_1 schema
* 14085 ExceptionStackTest: MessageException is stackless by default
* 14086 JournalControllerTest: ttl/plain context check

## 15 Tiny

Expand All @@ -430,3 +434,9 @@ Use `t.md` as local [Test Management](https://www.jetbrains.com/help/idea/test-m
* 15014 TinyTaskExecServiceTest: sleep 70s and check task
* 15015 MailNoticeTest: title dryrun mailNotice
* 15016 MailSenderManagerTest: title dryrun batch mail
* 15017 TinyMailServiceDbTest: mock fail and check database
* 15018 TinyTrackServiceTest: tiny track AOP service
* 15019 TinyTrackServiceTest: tiny track Mvc controller
* 15020 TinyTaskBeatServiceImplTest: beat mills cron/rate/idle
* 15021 TinyTaskExecServiceImplTest: calculate next schedule

4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Help Yourself [Commits] and [History]

Notable [Changes] in [WingsDoc]

[History]: https://github.com/trydofor/pro.fessional.wings/tags
[Commits]: https://github.com/trydofor/pro.fessional.wings/commits/develop
[History]: https://github.com/trydofor/professional-wings/tags
[Commits]: https://github.com/trydofor/professional-wings/commits/develop
[Changes]: https://wings.fessional.pro/9-example/9a.wings-change/
[WingsDoc]: https://wings.fessional.pro/
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
DROP TABLE IF EXISTS `winx_user_detail`; -- 210/User Detail;

-- CALL FLYWAVE('2022-0222u01-demo-init.sql');
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
-- CREATE DATABASE `wings_example` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;

CREATE TABLE `winx_user_detail` (
`id` BIGINT(20) NOT NULL COMMENT 'primary key',
`id` BIGINT NOT NULL COMMENT 'primary key',
`create_dt` DATETIME(3) NOT NULL DEFAULT NOW(3) COMMENT 'created datetime(sys)',
`modify_dt` DATETIME(3) NOT NULL DEFAULT '1000-01-01' ON UPDATE NOW(3) COMMENT 'modified datetime(sys)',
`delete_dt` DATETIME(3) NOT NULL DEFAULT '1000-01-01' COMMENT 'logic deleted datetime',
`commit_id` BIGINT(20) NOT NULL COMMENT 'commit id',
`user_id` BIGINT(20) NOT NULL COMMENT 'win_user_basis.id',
`user_type` INT(11) NOT NULL DEFAULT '0' COMMENT 'user type/21001##:customer|operator|helpdesk',
`commit_id` BIGINT NOT NULL COMMENT 'commit id',
`user_id` BIGINT NOT NULL COMMENT 'win_user_basis.id',
`user_type` INT NOT NULL DEFAULT '0' COMMENT 'user type/21001##:customer|operator|helpdesk',
`email` VARCHAR(100) NOT NULL DEFAULT '' COMMENT 'user email',
PRIMARY KEY (`id`),
UNIQUE INDEX uq_user_id (`user_id`),
Expand All @@ -26,3 +26,5 @@ VALUES (2100100, 'user_type', 'user_type', 'User Type', 'classpath:/wings-tmpl/C
(2100101, 'user_type', 'customer', 'customer', 'customer'),
(2100102, 'user_type', 'operator', 'operator', 'operator'),
(2100103, 'user_type', 'helpdesk', 'helpdesk', 'helpdesk');

-- CALL FLYWAVE('2022-0222v01-demo-init.sql');
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
"spring.datasource.url=" + Devops0ProjectConstant.JDBC_URL,
"spring.datasource.username=" + Devops0ProjectConstant.JDBC_USER,
"spring.datasource.password=" + Devops0ProjectConstant.JDBC_PASS,
// "wings.silencer.i18n.zoneid=UTC",
"wings.enabled.faceless.flywave=true",
"wings.faceless.flywave.auto-init=true",
"wings.faceless.flywave.checker=true",
"java.awt.headless=false",
"debug=true"
})
class Devops1SchemaManagerTest {

Expand All @@ -37,6 +43,15 @@ void initSchema() {
);
}

@Test
void bumpSchema() {
final Warlock1SchemaManager manager = new Warlock1SchemaManager(schemaRevisionManager);
manager.mergeBumping(2022_0222_01L,
includeWarlockPath(),
Helper::master
);
}

@Test
void resetSchema() {
long revi = 2022_0222_01L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.io.ResourceLoader;
import pro.fessional.mirana.data.CodeEnum;
import pro.fessional.wings.silencer.spring.help.SubclassSpringLoader;
import pro.fessional.wings.silencer.support.SubclassGather;

import java.util.Map;

Expand All @@ -27,7 +27,7 @@ public class Devops7EnumsDumperTest {

@Test
public void dumpCodeEnum() {
SubclassSpringLoader loader = new SubclassSpringLoader(resourceLoader);
SubclassGather loader = new SubclassGather(resourceLoader);
Class<CodeEnum> superEnum = CodeEnum.class;

Map<Class<?>, Enum<?>[]> enums = loader.loadSubEnums("pro.fessional", superEnum);
Expand Down
2 changes: 1 addition & 1 deletion observe/docs
Submodule docs updated 68 files
+1 −1 .tool-versions
+1 −0 README.md
+966 −716 package-lock.json
+5 −5 package.json
+5 −5 src/0-wings/0a-code-style.md
+74 −0 src/0-wings/0d-qa-devops.md
+32 −14 src/0-wings/0e-qa-config.md
+414 −228 src/0-wings/0h-prop-index.md
+41 −1 src/2-faceless/2a-flywave.md
+2 −2 src/2-faceless/2e-qa-flywave.md
+15 −1 src/2-faceless/2i-prop-faceless.md
+3 −3 src/2-faceless/2j-prop-flywave.md
+6 −2 src/3-slardar/3i-prop-slardar.md
+20 −3 src/3-slardar/3k-prop-function.md
+1 −5 src/4-warlock/4d-prop-warlock.md
+15 −1 src/4-warlock/4f-api-oauth.md
+2 −0 src/4-warlock/4g-watching.md
+17 −10 src/8-radiant/8b-prop-tinytask.md
+31 −3 src/8-radiant/8c-tinymail.md
+13 −1 src/8-radiant/8d-prop-tinymail.md
+85 −0 src/8-radiant/8e-tinygrow.md
+46 −0 src/8-radiant/8f-prop-tinygrow.md
+2 −0 src/8-radiant/README.md
+18 −2 src/9-example/9a.wings-change/9a0.notable.md
+30 −2 src/9-example/9a.wings-change/9a6.320-100.md
+1 −1 src/9-example/9a.wings-change/README.md
+1 −1 src/9-example/9b.spring-boot/9b2.actuator-admin.md
+1 −1 src/a-mirana/README.md
+1 −1 src/a-mirana/a1.mirana.md
+9 −5 src/a-mirana/a2.utilities.md
+1 −1 src/b-meepo/README.md
+1 −1 src/b-meepo/b1.meepo.md
+1 −1 src/b-meepo/b2.example.md
+1 −1 src/b-meepo/b3.syntax.md
+1 −1 src/b-meepo/b4.engine.md
+13 −13 src/b-meepo/b5.function.md
+1 −1 src/b-meepo/b6.question.md
+5 −5 src/zh/0-wings/0a-code-style.md
+72 −0 src/zh/0-wings/0d-qa-devops.md
+33 −15 src/zh/0-wings/0e-qa-config.md
+40 −1 src/zh/2-faceless/2a-flywave.md
+2 −2 src/zh/2-faceless/2e-qa-flywave.md
+15 −1 src/zh/2-faceless/2i-prop-faceless.md
+3 −3 src/zh/2-faceless/2j-prop-flywave.md
+6 −2 src/zh/3-slardar/3i-prop-slardar.md
+21 −4 src/zh/3-slardar/3k-prop-function.md
+1 −5 src/zh/4-warlock/4d-prop-warlock.md
+15 −1 src/zh/4-warlock/4f-api-oauth.md
+2 −0 src/zh/4-warlock/4g-watching.md
+40 −13 src/zh/8-radiant/8b-prop-tinytask.md
+28 −2 src/zh/8-radiant/8c-tinymail.md
+13 −1 src/zh/8-radiant/8d-prop-tinymail.md
+84 −0 src/zh/8-radiant/8e-tinygrow.md
+46 −0 src/zh/8-radiant/8f-prop-tinygrow.md
+4 −2 src/zh/8-radiant/README.md
+31 −4 src/zh/9-example/9a.wings-change/9a6.320-100.md
+1 −1 src/zh/9-example/9a.wings-change/README.md
+1 −1 src/zh/9-example/9b.spring-boot/9b2.actuator-admin.md
+1 −1 src/zh/a-mirana/README.md
+1 −1 src/zh/a-mirana/a1.mirana.md
+9 −5 src/zh/a-mirana/a2.utilities.md
+1 −1 src/zh/b-meepo/README.md
+1 −1 src/zh/b-meepo/b1.meepo.md
+1 −1 src/zh/b-meepo/b2.example.md
+1 −1 src/zh/b-meepo/b3.syntax.md
+1 −1 src/zh/b-meepo/b4.engine.md
+8 −8 src/zh/b-meepo/b5.function.md
+1 −1 src/zh/b-meepo/b6.question.md
2 changes: 1 addition & 1 deletion observe/mirana
Submodule mirana updated 25 files
+84 −0 .github/workflows/release-notes.yml
+1 −1 pom.xml
+139 −0 src/main/java/pro/fessional/mirana/cast/MethodConvertor.java
+115 −0 src/main/java/pro/fessional/mirana/cond/IfSetter.java
+105 −10 src/main/java/pro/fessional/mirana/cond/StaticFlag.java
+26 −0 src/main/java/pro/fessional/mirana/data/Null.java
+1 −2 src/main/java/pro/fessional/mirana/evil/ThreadLocalSoft.java
+3 −12 src/main/java/pro/fessional/mirana/flow/ReturnOrException.java
+12 −7 src/main/java/pro/fessional/mirana/func/Lam.java
+1 −9 src/main/java/pro/fessional/mirana/pain/IORuntimeException.java
+35 −44 src/main/java/pro/fessional/mirana/pain/ThrowableUtil.java
+22 −0 src/main/java/pro/fessional/mirana/pain/UncheckedException.java
+98 −33 src/main/java/pro/fessional/mirana/stat/LogStat.java
+1 −2 src/main/java/pro/fessional/mirana/time/StopWatch.java
+11 −11 src/main/java/pro/fessional/mirana/tk/AnyTicket.java
+34 −13 src/main/java/pro/fessional/mirana/tk/Ticket.java
+15 −1 src/main/java/pro/fessional/mirana/tk/TicketHelp.java
+87 −0 src/test/java/pro/fessional/mirana/cast/MethodConvertorTest.java
+87 −0 src/test/java/pro/fessional/mirana/cond/StaticFlagTest.java
+4 −0 src/test/java/pro/fessional/mirana/func/LamTest.java
+13 −37 src/test/java/pro/fessional/mirana/jmh/SetterMain.java
+14 −4 src/test/java/pro/fessional/mirana/pain/ThrowableUtilTest.java
+66 −0 src/test/java/pro/fessional/mirana/stat/LogStatTest.java
+2 −2 src/test/java/pro/fessional/mirana/tk/AnyTicketTest.java
+33 −0 src/test/resources/log-stat.txt
16 changes: 8 additions & 8 deletions observe/scripts/wings-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ $IMAGE_ENV_JAVA_ADD \

#######
function show_help() {
echo -e '\033[32m clean <dep|app|all> <boot-jar> \033[m clean docker-<dep|app|all> build dir of boot-jar'
echo -e '\033[32m print <dep|app|all> <boot-jar> \033[m print docker-<dep|app|all> Dockerfile of boot-jar'
echo -e '\033[32m unzip <dep|app|all> <boot-jar> \033[m unzip docker-<dep|app|all> files of boot-jar'
echo -e '\033[32m build <dep|app|all> <boot-jar> \033[m build docker-<dep|app|all> image of boot-jar'
echo -e '\033[32m help \033[m show this'
echo -e '\033[32m <dep> \033[m only dependencies + spring-boot-loader'
echo -e '\033[32m <app> \033[m <dep> + napshot-dependencies + application'
echo -e '\033[32m <all> \033[m <dep> + <app>'
echo -e '\033[32m clean <dep|app|all> <boot-jar> \033[0m clean docker-<dep|app|all> build dir of boot-jar'
echo -e '\033[32m print <dep|app|all> <boot-jar> \033[0m print docker-<dep|app|all> Dockerfile of boot-jar'
echo -e '\033[32m unzip <dep|app|all> <boot-jar> \033[0m unzip docker-<dep|app|all> files of boot-jar'
echo -e '\033[32m build <dep|app|all> <boot-jar> \033[0m build docker-<dep|app|all> image of boot-jar'
echo -e '\033[32m help \033[0m show this'
echo -e '\033[32m <dep> \033[0m only dependencies + spring-boot-loader'
echo -e '\033[32m <app> \033[0m <dep> + napshot-dependencies + application'
echo -e '\033[32m <all> \033[0m <dep> + <app>'
}

function docker_file() {
Expand Down
18 changes: 9 additions & 9 deletions observe/scripts/wings-mysql-dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ dumpopts=${*:3}
logxopts="--no-data"
confopts=--defaults-extra-file=$extracnf
if [[ -f "$extracnf" ]]; then
echo -e "\033[0;33mNOTE: defaults-extra-file \033[m"
echo -e "\033[0;33mNOTE: defaults-extra-file \033[0m"
grep -E "^(host|port|user)" "$extracnf"
else
echo -e "\033[0;31mERROR: should specific mysql config(at param-1), eg. ~/my.cnf\033[m"
echo -e "\033[0;31mERROR: should specific mysql config(at param-1), eg. ~/my.cnf\033[0m"
cat << 'EOF'
[client]
protocol=tcp
Expand All @@ -52,9 +52,9 @@ unalias mysql >/dev/null 2>&1
unalias mysqldump >/dev/null 2>&1

if [[ "$database" == "" ]]; then
echo -e "\033[0;31mWARN: need database(at param-2) to dump, eg.\033[m"
echo -e "\033[0;31mWARN: need database(at param-2) to dump, eg.\033[0m"
echo "./wings-mysql-dump.sh wings-mysql-client.cnf database --no-data"
echo -e "\033[0;33mNOTE:current databases \033[m"
echo -e "\033[0;33mNOTE:current databases \033[0m"
# shellcheck disable=SC2086
mysql $confopts -N -e "show databases;"
exit
Expand All @@ -81,7 +81,7 @@ if [[ $logs_cnt == 0 ]]; then
echo "no logs tables to dump"
echo "-- no logs tables to dump" > "$dump_logs_file"
else
echo -e "\033[0;33mNOTE: dump logs tables without data, count=$logs_cnt\033[m"
echo -e "\033[0;33mNOTE: dump logs tables without data, count=$logs_cnt\033[0m"

# shellcheck disable=SC2046,SC2086
if mysqldump $confopts $dumpopts $logxopts \
Expand All @@ -98,7 +98,7 @@ if [[ $main_cnt == 0 ]]; then
echo "no main tables to dump"
echo "-- no main tables to dump" > "$dump_main_file"
else
echo -e "\033[0;33mNOTE: dump main tables with data, count=$main_cnt\033[m"
echo -e "\033[0;33mNOTE: dump main tables with data, count=$main_cnt\033[0m"
# shellcheck disable=SC2046,SC2086
if mysqldump $confopts $dumpopts \
"$database" $(grep -vE '\$|__' "$dump_tbl_file") > "$dump_main_file"; then
Expand All @@ -109,13 +109,13 @@ else
fi
fi

echo -e "\033[0;33mNOTE: dump file $dump_head\033[m"
echo -e "\033[0;33mNOTE: dump file $dump_head\033[0m"
echo >> "$dump_tbl_file"

# shellcheck disable=SC2010
ls -lsh |grep "$dump_head" | tee -a "$dump_tbl_file"

echo -e "\033[0;33mNOTE: tips for zip, scp, restore \033[m"
echo -e "\033[0;33mNOTE: tips for zip, scp, restore \033[0m"
tee -a "$dump_tip_file" << EOF
## checksum
md5sum -c $dump_md5_file # checksum
Expand Down Expand Up @@ -153,7 +153,7 @@ cat $dump_logs_file $dump_main_file \\
./reset-password.sh \$mycnf \$newdb;
EOF

echo -e "\033[0;33mNOTE: tar files into $dump_tar_file \033[m"
echo -e "\033[0;33mNOTE: tar files into $dump_tar_file \033[0m"
tar -czf "$dump_tar_file" "$dump_tip_file" "$dump_tbl_file" "$dump_logs_file" "$dump_main_file" \
&& md5sum "$dump_tar_file" | tee "$dump_md5_file" \
&& rm -f "$dump_tbl_file" "$dump_logs_file" "$dump_main_file"
10 changes: 5 additions & 5 deletions observe/scripts/wings-mysql-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ command="$2"
option="$3"

if [[ "$command" == "" || "$command" == "help" || ! -f "$userenv" ]]; then
echo -e '\033[37;42;1mNOTE: users env file\033[m'
echo -e '\033[37;42;1mNOTE: users env file\033[0m'
# https://dev.mysql.com/doc/refman/8.0/en/account-management-statements.html
cat <<'EOF'
execute=false
Expand All @@ -54,7 +54,7 @@ host_app=10.11.%
host_dev=%
host_dba=%
EOF
echo -e '\033[37;42;1mNOTE: user manage\033[m'
echo -e '\033[37;42;1mNOTE: user manage\033[0m'
cat <<'EOF'
RENAME USER 'trydofor'@'%' TO 'trydofor'@'127.0.%';
DROP USER IF EXISTS 'trydofor'@'%';
Expand Down Expand Up @@ -91,7 +91,7 @@ fi
[[ "$host_dev" == "" ]] && host_dev=%
[[ "$host_dba" == "" ]] && host_dba=%

echo -e '\033[37;42;1mNOTE: users and passwd\033[m'
echo -e '\033[37;42;1mNOTE: users and passwd\033[0m'
grep -v '^#' <<EOF
${user_raw}${user_pre}${name_pre}raw $pass_raw
${user_app}${user_pre}${name_pre}app $pass_app
Expand All @@ -100,7 +100,7 @@ ${user_dba}${user_pre}${name_pre}dba $pass_dba
EOF

temp_sql="$userenv.sql"
echo -e "\033[37;42;1mNOTE: sql script $temp_sql\033[m"
echo -e "\033[37;42;1mNOTE: sql script $temp_sql\033[0m"
rm "$temp_sql" >/dev/null 2>&1

if [[ "$command" == "create" ]]; then
Expand Down Expand Up @@ -148,7 +148,7 @@ if [[ "$execute" == "true" ]]; then
unalias mysql >/dev/null 2>&1

if [[ -f "$option" ]]; then
echo -e "\033[0;33mNOTE: current option file \033[m"
echo -e "\033[0;33mNOTE: current option file \033[0m"
cat "$option"
mysql --defaults-extra-file="$option" -vvv --force < "$temp_sql"
else
Expand Down
Loading