Skip to content

Commit

Permalink
move scripts to top level
Browse files Browse the repository at this point in the history
  • Loading branch information
doylemark committed Jun 26, 2024
1 parent cf6b261 commit bee6bea
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[env]
CLI_VERSION = "4.1.1"
CLI_VERSION_MAJOR = "4"
ENCLAVE_RUNTIME_VERSION = "1.0.5"
[registry]
global-credential-providers = ["cargo:token"]
7 changes: 2 additions & 5 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ jobs:
run: cargo install cross

- name: Inject Version
working-directory: crates/ev-cli
run: |
sh ./scripts/insert-cli-version.sh ${{ inputs.full-version }}
sh ./scripts/insert-crate-versions.sh ${{ inputs.full-version }}
- name: Build and Compress cli
run: |
Expand All @@ -84,9 +83,8 @@ jobs:
- uses: actions/checkout@v3

- name: Inject Version
working-directory: crates/ev-cli
run: |
sh ./scripts/insert-cli-version.sh ${{ inputs.full-version }}
sh ./scripts/insert-crate-versions.sh ${{ inputs.full-version }}
- uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -154,7 +152,6 @@ jobs:
- uses: actions/checkout@v3
- name: Update install script in S3
working-directory: crates/ev-cli
run: |
sh ./scripts/generate-installer.sh ${{ inputs.full-version }} ${{ inputs.major-version }} ${{ inputs.ev-domain }}
sh ./scripts/update-versions.sh ${{ inputs.full-version }} ${{ inputs.ev-domain }}
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "common"
version = "0.1.0"
version = "1.0.0-dev"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 2 additions & 2 deletions crates/common/src/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ pub trait ApiClient {
}

fn user_agent(&self) -> String {
format!("evervault-cli/{}", env!("CLI_VERSION"))
format!("evervault-cli/{}", env!("CARGO_PKG_VERSION"))
}

fn accept(&self) -> String {
format!("application/json;version={}", env!("CLI_VERSION_MAJOR"))
"application/json".to_string()
}

fn is_authorised(&self) -> bool {
Expand Down
4 changes: 4 additions & 0 deletions crates/common/src/api/enclave_assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ impl ApiClient for EnclaveAssetsClient {
fn update_auth(&mut self, _: AuthMode) -> Result<(), ApiClientError> {
Err(ApiClientError::AuthModeNotSupported)
}

fn accept(&self) -> String {
format!("application/json;version={}", 1)
}
}

impl Default for EnclaveAssetsClient {
Expand Down
2 changes: 1 addition & 1 deletion crates/ev-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "ev-cli"
version = "0.0.0"
version = "1.0.0-dev"

[[bin]]
name = "ev"
Expand Down
4 changes: 0 additions & 4 deletions crates/ev-cli/scripts/insert-cli-version.sh

This file was deleted.

File renamed without changes.
5 changes: 5 additions & 0 deletions scripts/insert-crate-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

pattern="s/1.0.0-dev/$1/"
sed -i -e "$pattern" ./crates/ev-cli/Cargo.toml
sed -i -e "$pattern" ./crates/common/Cargo.toml
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bee6bea

Please sign in to comment.