mirror of
https://github.com/SinTan1729/chhoto-url.git
synced 2025-12-06 05:24:25 -08:00
chg: Use minify in place
This commit is contained in:
7
.github/workflows/docker-release.yml
vendored
7
.github/workflows/docker-release.yml
vendored
@@ -68,15 +68,12 @@ jobs:
|
|||||||
mv $f/chhoto-url actix/target/$f/release/
|
mv $f/chhoto-url actix/target/$f/release/
|
||||||
chmod +x actix/target/$f/release/chhoto-url
|
chmod +x actix/target/$f/release/chhoto-url
|
||||||
done
|
done
|
||||||
- name: Move resouces to expected place without minifying
|
- name: Minify resources for release
|
||||||
if: github.ref_type != 'tag'
|
|
||||||
run: mv resources/ resources-final/
|
|
||||||
- name: Minify resources
|
|
||||||
if: github.ref_type == 'tag'
|
if: github.ref_type == 'tag'
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install minify
|
sudo apt install minify
|
||||||
minify -rs -o resources-final/ resources/
|
minify -rsi resources/
|
||||||
- name: Display current directory structure
|
- name: Display current directory structure
|
||||||
run: ls -R
|
run: ls -R
|
||||||
- name: Log in to the Docker Hub
|
- name: Log in to the Docker Hub
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-ur
|
|||||||
|
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
FROM builder-$TARGETARCH
|
FROM builder-$TARGETARCH
|
||||||
COPY ./resources-final /resources
|
COPY ./resources /resources
|
||||||
|
|
||||||
ENTRYPOINT ["/chhoto-url"]
|
ENTRYPOINT ["/chhoto-url"]
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-ur
|
|||||||
|
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
FROM builder-$TARGETARCH
|
FROM builder-$TARGETARCH
|
||||||
COPY ./resources-final /resources
|
COPY ./resources /resources
|
||||||
|
|
||||||
ENTRYPOINT ["/chhoto-url"]
|
ENTRYPOINT ["/chhoto-url"]
|
||||||
|
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -61,14 +61,14 @@ endif
|
|||||||
# v_minor := $(shell cat actix/Cargo.toml | sed -rn 's/^version = "(.+)\..+"$$/\1/p')
|
# 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')
|
# v_major := $(shell cat actix/Cargo.toml | sed -rn 's/^version = "(.+)\..+\..+"$$/\1/p')
|
||||||
# docker-release: tag build-release
|
# 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} \
|
# 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 \
|
# --tag ${docker_username}/chhoto-url:${v_patch} --tag ${docker_username}/chhoto-url:latest \
|
||||||
# --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.alpine .
|
# --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} \
|
# 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 \
|
# --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 .
|
# --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.scratch .
|
||||||
# rm -rf resources-final/
|
# git restore resources/
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
docker ps -q --filter "name=chhoto-url" | xargs -r docker stop
|
docker ps -q --filter "name=chhoto-url" | xargs -r docker stop
|
||||||
|
|||||||
Reference in New Issue
Block a user