Skip to content

Commit

Permalink
chore: update to dfx 0.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity committed Jun 10, 2024
1 parent e2849a8 commit 5e133cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
6 changes: 3 additions & 3 deletions bazel/dfx.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ package(default_visibility = ["//visibility:public"])
exports_files(["dfx"])
"""

VERSION = "0.19.0"
VERSION = "0.20.1"
SHA256 = {
"linux": "c40387d13ab6ed87349fa21a98835f8d384f867333806ee6b9025891ed96e5c5",
"darwin": "f61179fa9884f111dbec20c293d77472dcf66d04b0567818fe546437aadd8ce6",
"linux": "011c8a6ff9af0578ee2c8b0a7af3abc5b3d5950cc64421b4c3a7acd1fc18265e",
"darwin": "4b1c24805f655576fb97f61aba019fbbe7c1bdca0598a5c1a9220a4bfe80f460",
}

URL = "https://github.com/dfinity/sdk/releases/download/{version}/dfx-{version}-{arch}-{platform}.tar.gz"
Expand Down
4 changes: 1 addition & 3 deletions rs/tests/sdk/dfx_smoke_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@ fn test(env: TestEnv) {

dfx.ping();

dfx.new_project("hello", FrontendType::None, BackendType::Motoko);
dfx.new_project("hello", FrontendType::SimpleAssets, BackendType::Motoko);

let project_dir = fs::canonicalize(env.base_path()).unwrap().join("hello");

project::add_frontend_canister(&log, &project_dir, "hello");

let dfx = dfx.with_working_dir(&project_dir);

dfx.deploy();
Expand Down
20 changes: 0 additions & 20 deletions rs/tests/sdk/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,6 @@ use std::path::Path;

const CANISTER_COUNTER_MO: &str = include_str!("../canisters/counter.mo");

// dfx 0.19.0 cannot create a frontend canister if node is installed but npm is not
pub fn add_frontend_canister(log: &Logger, project_dir: &Path, project_name: &str) {
let canister_name = format!("{project_name}_frontend");
let relative_assets_dir = "src/{project_name}_frontend/assets";
let canister = json!({
"type": "assets",
"dependencies": [
format!("{project_name}_backend")
],
"source": [
relative_assets_dir
]
});
add_canister(log, project_dir, &canister_name, canister);
let assets_dir = project_dir.join(relative_assets_dir);
fs::create_dir_all(&assets_dir).unwrap();
let sample_asset_path = assets_dir.join("sample-asset.txt");
fs::write(sample_asset_path, "This is a sample asset!\n").unwrap();
}

pub fn add_counter_canister(log: &Logger, project_dir: &Path) {
add_motoko_canister(log, project_dir, "counter", CANISTER_COUNTER_MO);
}
Expand Down

0 comments on commit 5e133cc

Please sign in to comment.