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

Add forc-submit to components.toml (sway #3875) #689

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion component/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use toml_edit::de;
// Keeping forc since some ways we handle forc is slightly different.
pub const FORC: &str = "forc";
pub const FUELUP: &str = "fuelup";
// forc-client is handled differently - its actual binaries are 'forc-run' and 'forc-deploy'
// forc-client is handled differently - its actual binaries are 'forc-run', 'forc-deploy', and 'forc-submit'
pub const FORC_CLIENT: &str = "forc-client";

const COMPONENTS_TOML: &str = include_str!("../../components.toml");
Expand Down
2 changes: 1 addition & 1 deletion components.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ targets = ["linux_amd64", "linux_arm64", "darwin_amd64", "darwin_arm64"]
name = "forc-client"
tarball_prefix = "forc-binaries"
is_plugin = true
executables = ["forc-deploy", "forc-run"]
executables = ["forc-deploy", "forc-run", "forc-submit"]
repository_name = "sway"
targets = ["linux_amd64", "linux_arm64", "darwin_amd64", "darwin_arm64"]

Expand Down
1 change: 1 addition & 0 deletions docs/src/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ forc-crypto --version
forc-debug --version
forc-lsp --version
forc-run --version
forc-submit --version
```

[repository]: https://github.com/FuelLabs/fuelup
7 changes: 7 additions & 0 deletions tests/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fn fuelup_show_latest() -> Result<()> {
- forc-client
- forc-deploy : 0.1.0
- forc-run : 0.1.0
- forc-submit : 0.1.0
- forc-crypto : 0.1.0
- forc-debug : 0.1.0
- forc-doc : 0.1.0
Expand Down Expand Up @@ -78,6 +79,7 @@ fn fuelup_show_and_switch() -> Result<()> {
- forc-client
- forc-deploy : 0.1.0
- forc-run : 0.1.0
- forc-submit : 0.1.0
- forc-crypto : 0.1.0
- forc-debug : 0.1.0
- forc-doc : 0.1.0
Expand Down Expand Up @@ -113,6 +115,7 @@ fn fuelup_show_and_switch() -> Result<()> {
- forc-client
- forc-deploy : 0.2.0
- forc-run : 0.2.0
- forc-submit : 0.2.0
- forc-crypto : 0.2.0
- forc-debug : 0.2.0
- forc-doc : 0.2.0
Expand Down Expand Up @@ -154,6 +157,7 @@ fn fuelup_show_custom() -> Result<()> {
- forc-client
- forc-deploy : not found
- forc-run : not found
- forc-submit : not found
- forc-crypto : not found
- forc-debug : not found
- forc-doc : not found
Expand Down Expand Up @@ -193,6 +197,7 @@ fn fuelup_show_override() -> Result<()> {
- forc-client
- forc-deploy : not found
- forc-run : not found
- forc-submit : not found
- forc-crypto : not found
- forc-debug : not found
- forc-doc : not found
Expand Down Expand Up @@ -235,6 +240,7 @@ fn fuelup_show_latest_then_override() -> Result<()> {
- forc-client
- forc-deploy : 0.1.0
- forc-run : 0.1.0
- forc-submit : 0.1.0
- forc-crypto : 0.1.0
- forc-debug : 0.1.0
- forc-doc : 0.1.0
Expand Down Expand Up @@ -283,6 +289,7 @@ fn fuelup_show_latest_then_override() -> Result<()> {
- forc-client
- forc-deploy : 0.2.0
- forc-run : 0.2.0
- forc-submit : 0.2.0
- forc-crypto : 0.2.0
- forc-debug : 0.2.0
- forc-doc : 0.2.0
Expand Down
9 changes: 3 additions & 6 deletions tests/testcfg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ pub static ALL_BINS: &[&str] = &[
"forc-index",
"forc-lsp",
"forc-run",
"forc-submit",
"forc-tx",
"forc-wallet",
"fuel-core",
Expand All @@ -101,15 +102,11 @@ pub static ALL_BINS: &[&str] = &[
/// assert!(re.is_match(&yesterday));
/// ```
pub fn yesterday() -> String {
// CI failed building linux binaries on 2024-10-25 which happens to be
// "yesterday" when I'm trying to push this PR, so we need to override this
// temporarily to pass CI over the weekend. I'll be merging on top of this
// PR in the next few days and will remove this temporary fix

let current_date = Utc::now();
let yesterday = current_date - Duration::days(1);
let _ = yesterday.format("%Y-%m-%d").to_string();
"2024-10-23".to_string()
// TODO: point to a nightly that has `forc-submit`
"2024-11-16".to_string()
}

impl TestCfg {
Expand Down
Loading