Skip to content

Commit

Permalink
build: not specify rust version
Browse files Browse the repository at this point in the history
  • Loading branch information
innobead committed Dec 9, 2023
1 parent 1fab8c9 commit 0f1926c
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 15 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ version = "0.3.11"
description = "Huber package, simplify `GitHub release` package management with a live awesome list of GitHub project"
authors = ["David Ko <innobead@gmail.com>"]
edition = "2021"
rust-version = "1.68"
keywords = ["github", "package-management", "cli", "package"]
categories = ["command-line-interface", "command-line-utilities", "development-tools"]
homepage = "https://github.com/innobead/huber"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.68 as build
FROM rust:latest as build
WORKDIR /workspace
ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.68
FROM rust:latest

WORKDIR /workspace

Expand Down
1 change: 0 additions & 1 deletion crates/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version.workspace = true
description.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
keywords.workspace = true
categories.workspace = true
homepage.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version.workspace = true
description = "Internal package used by Huber"
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
keywords.workspace = true
categories.workspace = true
homepage.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version.workspace = true
description = "Internal package used by Huber"
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
keywords.workspace = true
categories.workspace = true
homepage.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/procmacro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version.workspace = true
description = "Internal package used by Huber"
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
keywords.workspace = true
categories.workspace = true
homepage.workspace = true
Expand Down
8 changes: 3 additions & 5 deletions hack/setup-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set -o nounset
set -o pipefail
set -o xtrace

RUST_VERSION=${RUST_VERSION:-1.65}

function install_linux_dependencies() {
if [[ $(command -v zypper) ]]; then
# sudo zypper install -y -t pattern devel_basis
Expand Down Expand Up @@ -58,12 +56,12 @@ function install_macos_dependencies() {
echo "export PKG_CONFIG_PATH=/usr/local/opt/libarchive/lib/pkgconfig"
} >>"$HOME"/.bashrc

. "$HOME"/.bashrc
source "$HOME"/.bashrc
}

function install_rust_dependencies() {
if [[ -z $(command -v cargo 2>/dev/null) ]] || [[ -z $(cargo version | awk "/cargo $RUST_VERSION/" 2>/dev/null) ]]; then
curl https://sh.rustup.rs -sSf | sh -s -- -y
if [[ -z $(command -v cargo 2>/dev/null) ]]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME"/.cargo/env
cargo version
fi
Expand Down
10 changes: 7 additions & 3 deletions hack/update-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ set -o pipefail
set -o xtrace

export_statement="export PATH=\$HOME/.huber/bin:\$PATH"
if ! grep -Fxq "$export_statement" ~/.bashrc; then
echo "$export_statement" >> ~/.bashrc
fi

shells=(bashrc zshrc)
for s in "${shells[@]}"; do
if [ -f "$HOME"/."$s" ] && ! grep -Fxq "$export_statement" "$HOME"/."$s"; then
echo "$export_statement" >>"$HOME"/."$s"
fi
done

0 comments on commit 0f1926c

Please sign in to comment.