Skip to content

Commit

Permalink
Add forc-submit to components.toml (sway #3875) (#689)
Browse files Browse the repository at this point in the history
* Add `forc-submit` to components.toml (sway #3875)

* temporary fix: point 'yesterday()' to where 'forc-submit` exists
  • Loading branch information
alfiedotwtf authored Nov 19, 2024
1 parent 5cd94cc commit 665abb1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
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

0 comments on commit 665abb1

Please sign in to comment.