mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Add commit id into testing version (#375)
This commit is contained in:
1 parent
4454ef94ae
commit
1ead1f8c7f
3 files changed
+19
-1
No files matched your search
@@ -7,6 +7,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Add commit id into version
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||||
- name: Build
|
- name: Build
|
||||||
run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:x86-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:x86-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||||
- name: Upload
|
- name: Upload
|
||||||
@@ -29,6 +32,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Add commit id into version
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||||
- name: Build
|
- name: Build
|
||||||
run: docker run -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:amd64-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
run: docker run -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:amd64-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||||
- name: Upload
|
- name: Upload
|
||||||
@@ -51,6 +57,9 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Add commit id into version
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
run: SHA=$(git rev-parse --short HEAD) && sed -i -e 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bash scripts/build.macos.release.sh
|
run: bash scripts/build.macos.release.sh
|
||||||
- name: Upload
|
- name: Upload
|
||||||
@@ -85,6 +94,9 @@ jobs:
|
|||||||
install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 patch
|
install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 patch
|
||||||
msystem: MINGW64
|
msystem: MINGW64
|
||||||
path-type: inherit
|
path-type: inherit
|
||||||
|
- name: Add commit id into version
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bash scripts/build.windows.release.sh
|
run: bash scripts/build.windows.release.sh
|
||||||
- name: Upload
|
- name: Upload
|
||||||
@@ -119,6 +131,9 @@ jobs:
|
|||||||
install: base-devel git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-libevent mingw-w64-i686-pcre2 patch
|
install: base-devel git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-libevent mingw-w64-i686-pcre2 patch
|
||||||
msystem: MINGW32
|
msystem: MINGW32
|
||||||
path-type: inherit
|
path-type: inherit
|
||||||
|
- name: Add commit id into version
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bash scripts/build.windows.release.sh
|
run: bash scripts/build.windows.release.sh
|
||||||
- name: Upload
|
- name: Upload
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ jobs:
|
|||||||
- name: Docker buildx image and push on master branch
|
- name: Docker buildx image and push on master branch
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --output "type=image,push=true" --platform=linux/amd64,linux/arm/v7,linux/arm64,linux/386 --tag tindy2013/subconverter:latest scripts/
|
SHA=$(git rev-parse --short HEAD)
|
||||||
|
docker buildx build --build-arg SHA="$SHA" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v7,linux/arm64,linux/386 --tag tindy2013/subconverter:latest scripts/
|
||||||
|
|
||||||
- name: Replace tag without `v`
|
- name: Replace tag without `v`
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
FROM alpine:3.13
|
FROM alpine:3.13
|
||||||
LABEL maintainer "tindy.it@gmail.com"
|
LABEL maintainer "tindy.it@gmail.com"
|
||||||
|
ARG SHA=""
|
||||||
|
|
||||||
# build minimized
|
# build minimized
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
@@ -33,6 +34,7 @@ RUN apk add --no-cache --virtual .build-tools git g++ build-base linux-headers c
|
|||||||
cd .. && \
|
cd .. && \
|
||||||
git clone https://github.com/tindy2013/subconverter --depth=1 && \
|
git clone https://github.com/tindy2013/subconverter --depth=1 && \
|
||||||
cd subconverter && \
|
cd subconverter && \
|
||||||
|
[ -n "$SHA" ] && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h;\
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release . && \
|
cmake -DCMAKE_BUILD_TYPE=Release . && \
|
||||||
make -j4 && \
|
make -j4 && \
|
||||||
mv subconverter /usr/bin && \
|
mv subconverter /usr/bin && \
|
||||||
|
|||||||
Reference in new issue
Block a user