Skip to content

Commit 738575e

Browse files
author
nicos_backbase
committed
fix: build issues
1 parent 5d234cd commit 738575e

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ jobs:
6969
tag_prefix: "v"
7070
major_pattern: "(MAJOR|BREAKING CHANGE|!:)"
7171
minor_pattern: "(MINOR|feat:|feature:)"
72-
patch_pattern: "(PATCH|fix:|patch:|hotfix:)"
7372
version_format: "${major}.${minor}.${patch}"
7473
change_path: "src"
7574
namespace: ""
@@ -177,22 +176,23 @@ jobs:
177176
key: ${{ matrix.target }}
178177

179178
- name: Build for ${{ matrix.target }}
180-
run: |
181-
cargo build --release --target ${{ matrix.target }}
182-
if [[ "${{ matrix.target }}" == *"windows"* ]]; then
183-
mv target/${{ matrix.target }}/release/repos.exe repos-${{ matrix.target }}.exe
184-
else
185-
mv target/${{ matrix.target }}/release/repos repos-${{ matrix.target }}
186-
fi
187-
188-
- name: Strip binary (Unix only)
189-
if: matrix.suffix == ''
190-
run: |
191-
if [[ "${{ runner.os }}" == "macOS" ]]; then
192-
strip -x repos-${{ matrix.target }}
193-
else
194-
strip repos-${{ matrix.target }}
195-
fi
179+
run: cargo build --release --target ${{ matrix.target }}
180+
181+
- name: Rename Windows binary
182+
if: contains(matrix.target, 'windows')
183+
run: mv target/${{ matrix.target }}/release/repos.exe repos-${{ matrix.target }}.exe
184+
185+
- name: Rename Unix binary
186+
if: "!contains(matrix.target, 'windows')"
187+
run: mv target/${{ matrix.target }}/release/repos repos-${{ matrix.target }}
188+
189+
- name: Strip binary (macOS)
190+
if: "!contains(matrix.target, 'windows') && runner.os == 'macOS'"
191+
run: strip -x repos-${{ matrix.target }}
192+
193+
- name: Strip binary (Linux)
194+
if: "!contains(matrix.target, 'windows') && runner.os == 'Linux'"
195+
run: strip repos-${{ matrix.target }}
196196

197197
- name: Create archive
198198
shell: bash

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ RUN apk add --no-cache \
1313
gcc
1414

1515
# Copy dependency files first for better caching
16-
COPY Cargo.toml Cargo.lock ./
16+
COPY Cargo.toml ./
17+
COPY Cargo.loc[k] ./
1718

1819
# Create dummy source to build dependencies
1920
RUN mkdir src && echo "fn main() {}" > src/main.rs && \

0 commit comments

Comments
 (0)