mirror of
https://github.com/shiroyashik/sculptor.git
synced 2025-12-06 04:51:13 +03:00
Workflow fixed
НАХУЙ ЭТО ГОВНО!
This commit is contained in:
parent
0526cc9412
commit
c0bf550eb8
6 changed files with 4 additions and 24 deletions
2
.github/workflows/dev-release.yml
vendored
2
.github/workflows/dev-release.yml
vendored
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
|
||||
- name: Get short SHA
|
||||
id: short_sha
|
||||
run: echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)"
|
||||
run: echo "sha=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ version = "0.4.0-dev"
|
|||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
# Logging
|
||||
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "chrono"] }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
## Chef
|
||||
# FROM clux/muslrust:stable AS chef
|
||||
FROM rust:1.81.0-alpine3.20 as chef
|
||||
FROM rust:1.81.0-alpine3.20 AS chef
|
||||
USER root
|
||||
RUN apk add musl-dev libressl-dev
|
||||
RUN apk add --no-cache musl-dev libressl-dev
|
||||
RUN cargo install cargo-chef
|
||||
WORKDIR /build
|
||||
|
||||
|
|
|
|||
17
build.rs
17
build.rs
|
|
@ -1,17 +0,0 @@
|
|||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
let output = match Command::new("git").args(&["rev-parse", "HEAD"]).output() {
|
||||
Ok(d) => d,
|
||||
Err(err) => {
|
||||
eprintln!("Can't run git and get last commit due: {err:?}");
|
||||
println!("cargo:rustc-env=GIT_HASH=0000000000000000000000000000000000000000");
|
||||
return
|
||||
}
|
||||
};
|
||||
let mut git_hash = String::from_utf8(output.stdout).unwrap();
|
||||
if &git_hash == "HEAD" || git_hash.len() < 7 {
|
||||
git_hash = String::from("0000000000000000000000000000000000000000");
|
||||
}
|
||||
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ pub const AVATARS_ENV: &'static str = "AVATARS_FOLDER";
|
|||
// Instance info
|
||||
pub const SCULPTOR_VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||
pub const REPOSITORY: &'static str = "shiroyashik/sculptor";
|
||||
pub const GIT_HASH: &'static str = env!("GIT_HASH", "Can't run git or build.rs failing!");
|
||||
|
||||
// reqwest parameters
|
||||
pub const USER_AGENT: &'static str = "reqwest";
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ async fn main() -> Result<()> {
|
|||
}));
|
||||
|
||||
// 3. Display info about current instance and check updates
|
||||
tracing::info!("The Sculptor v{SCULPTOR_VERSION}+{} ({REPOSITORY})", &GIT_HASH[..7]);
|
||||
tracing::info!("The Sculptor v{SCULPTOR_VERSION} ({REPOSITORY})");
|
||||
// let _ = check_updates(REPOSITORY, SCULPTOR_VERSION).await; // Currently, there is no need to do anything with the result of the function
|
||||
|
||||
match get_latest_version(REPOSITORY).await {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue