Implement reset for Go, Pub, Flutter
Some checks failed
Publish AUR Package (chsrc-git) / publish (push) Has been cancelled

[GitHub #111]
This commit is contained in:
Aoran Zeng 2024-10-31 20:49:33 +08:00
parent 3e2e7f92fd
commit 5b23eb08e6
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
5 changed files with 50 additions and 7 deletions

View File

@ -24,7 +24,7 @@
* chsrc: Change Source * chsrc: Change Source
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
#define Chsrc_Version "0.1.9.2" #define Chsrc_Version "0.1.9.2-dev1"
#define Chsrc_Release_Date "2024/10/31" #define Chsrc_Release_Date "2024/10/31"
#define Chsrc_Banner_Version "v" Chsrc_Version "-" Chsrc_Release_Date #define Chsrc_Banner_Version "v" Chsrc_Version "-" Chsrc_Release_Date
#define Chsrc_Maintain_URL "https://github.com/RubyMetric/chsrc" #define Chsrc_Maintain_URL "https://github.com/RubyMetric/chsrc"

View File

@ -87,6 +87,13 @@ pl_dart_flutter_setsrc (char *option)
} }
void
pl_dart_flutter_resetsrc (char *option)
{
pl_dart_flutter_setsrc (SetsrcType_Reset);
}
/** /**
* chsrc ls flutter * chsrc ls flutter
*/ */
@ -96,7 +103,7 @@ pl_dart_flutter_feat (char *option)
FeatInfo f = {0}; FeatInfo f = {0};
f.can_get = true; f.can_get = true;
f.can_reset = false; f.can_reset = true;
f.cap_locally = CanNot; f.cap_locally = CanNot;
f.locally = NULL; f.locally = NULL;
@ -108,4 +115,4 @@ pl_dart_flutter_feat (char *option)
return f; return f;
} }
def_target_gsf(pl_dart_flutter); def_target_gsrf(pl_dart_flutter);

View File

@ -83,13 +83,20 @@ pl_dart_setsrc (char *option)
} }
void
pl_dart_resetsrc (char *option)
{
pl_dart_setsrc (SetsrcType_Reset);
}
FeatInfo FeatInfo
pl_dart_feat (char *option) pl_dart_feat (char *option)
{ {
FeatInfo f = {0}; FeatInfo f = {0};
f.can_get = true; f.can_get = true;
f.can_reset = false; f.can_reset = true;
f.cap_locally = CanNot; f.cap_locally = CanNot;
f.locally = NULL; f.locally = NULL;
@ -101,4 +108,4 @@ pl_dart_feat (char *option)
return f; return f;
} }
def_target_gsf(pl_dart); def_target_gsrf(pl_dart);

View File

@ -75,4 +75,33 @@ pl_go_setsrc (char *option)
chsrc_conclude (&source, SetsrcType_Auto); chsrc_conclude (&source, SetsrcType_Auto);
} }
def_target(pl_go);
void
pl_go_resetsrc (char *option)
{
pl_go_setsrc (SetsrcType_Reset);
}
/**
* chsrc ls go
*/
FeatInfo
pl_go_feat (char *option)
{
FeatInfo f = {0};
f.can_get = true;
f.can_reset = true;
f.cap_locally = CanNot;
f.locally = NULL;
f.can_english = false;
f.can_user_define = true;
f.note = NULL;
return f;
}
def_target_gsrf(pl_go);

View File

@ -55,7 +55,7 @@ pl_ruby_remove_gem_source (const char *source)
} }
/** /**
* Ruby换源https://gitee.com/RubyMetric/rbenv-cn * @consult https://gitee.com/RubyMetric/rbenv-cn
*/ */
void void
pl_ruby_setsrc (char *option) pl_ruby_setsrc (char *option)