chg: Use minify in place

This commit is contained in:
SinTan1729
2025-07-18 11:14:47 -05:00
parent cf67b30c53
commit b987abe68a
4 changed files with 6 additions and 9 deletions

View File

@@ -68,15 +68,12 @@ jobs:
mv $f/chhoto-url actix/target/$f/release/
chmod +x actix/target/$f/release/chhoto-url
done
- name: Move resouces to expected place without minifying
if: github.ref_type != 'tag'
run: mv resources/ resources-final/
- name: Minify resources
- name: Minify resources for release
if: github.ref_type == 'tag'
run: |
sudo apt update
sudo apt install minify
minify -rs -o resources-final/ resources/
minify -rsi resources/
- name: Display current directory structure
run: ls -R
- name: Log in to the Docker Hub

View File

@@ -12,7 +12,7 @@ COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-ur
ARG TARGETARCH
FROM builder-$TARGETARCH
COPY ./resources-final /resources
COPY ./resources /resources
ENTRYPOINT ["/chhoto-url"]

View File

@@ -12,7 +12,7 @@ COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-ur
ARG TARGETARCH
FROM builder-$TARGETARCH
COPY ./resources-final /resources
COPY ./resources /resources
ENTRYPOINT ["/chhoto-url"]

View File

@@ -61,14 +61,14 @@ endif
# v_minor := $(shell cat actix/Cargo.toml | sed -rn 's/^version = "(.+)\..+"$$/\1/p')
# v_major := $(shell cat actix/Cargo.toml | sed -rn 's/^version = "(.+)\..+\..+"$$/\1/p')
# docker-release: tag build-release
# minify -rs -o resources-final/ resources/
# minify -rsi resources/
# docker buildx build --push --tag ${docker_username}/chhoto-url:${v_major} --tag ${docker_username}/chhoto-url:${v_minor} \
# --tag ${docker_username}/chhoto-url:${v_patch} --tag ${docker_username}/chhoto-url:latest \
# --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.alpine .
# docker buildx build --push --tag ghcr.io/${github_username}/chhoto-url:${v_major} --tag ghcr.io/${github_username}/chhoto-url:${v_minor} \
# --tag ghcr.io/${github_username}/chhoto-url:${v_patch} --tag ghcr.io/${github_username}/chhoto-url:latest \
# --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.scratch .
# rm -rf resources-final/
# git restore resources/
clean:
docker ps -q --filter "name=chhoto-url" | xargs -r docker stop