Skip to content

Commit

Permalink
chore: run build_runner when building
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierChanth committed Oct 10, 2023
1 parent 44bd996 commit 173b711
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/composite/verify_cli_tags/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ runs:
if: startsWith(github.ref, 'refs/tags/v')
working-directory: ./packages/sshnoports
run: |
# check version.dart
REF=${{ github.ref }}
TAG=${REF:10}
PUBSPEC_TAG="v$(egrep -o '^version: (.*)$' pubspec.yaml | cut -d':' -f2 | tr -d '[:space:]')"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/multibuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- run: mkdir sshnp
- run: mkdir tarball
- run: dart pub get
- run: dart run build_runner build
- run: dart compile exe bin/activate_cli.dart -v -o sshnp/at_activate
- run: dart compile exe bin/sshnp.dart -v -o sshnp/sshnp
- run: dart compile exe bin/sshnpd.dart -v -o sshnp/sshnpd
Expand Down
10 changes: 6 additions & 4 deletions packages/sshnoports/templates/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ COPY . .
RUN \
set -eux ; \
mkdir -p ${BINARYDIR} ; \
dart pub get -C ${PACKAGEDIR}; \
dart pub update -C ${PACKAGEDIR}; \
dart compile exe ${PACKAGEDIR}/bin/sshnpd.dart -o ${BINARYDIR}/sshnpd ; \
dart compile exe ${PACKAGEDIR}/bin/sshrv.dart -o ${BINARYDIR}/sshrv
cd ${PACKAGEDIR}; \
dart pub get ; \
dart pub update ; \
dart run build_runner build; \
dart compile exe bin/sshnpd.dart -o ${BINARYDIR}/sshnpd ; \
dart compile exe bin/sshrv.dart -o ${BINARYDIR}/sshrv

# Second stage of build FROM debian-slim
FROM debian:stable-20230919-slim@sha256:149e944a6f4855f9738baf4ddd79fc2f218e6440218223fa9017aebc1e45f1f5
Expand Down
8 changes: 5 additions & 3 deletions packages/sshnoports/templates/docker/Dockerfile.activate
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ COPY . .
RUN \
set -eux ; \
mkdir -p ${BINARYDIR} ; \
dart pub get -C ${PACKAGEDIR}; \
dart pub update -C ${PACKAGEDIR}; \
dart compile exe ${PACKAGEDIR}/bin/activate_cli.dart -o ${BINARYDIR}/at_activate
cd ${PACKAGEDIR}; \
dart pub get ; \
dart pub update ; \
dart run build_runner build; \
dart compile exe bin/activate_cli.dart -o ${BINARYDIR}/at_activate

# Second stage of build FROM debian-slim
FROM debian:stable-20230919-slim@sha256:149e944a6f4855f9738baf4ddd79fc2f218e6440218223fa9017aebc1e45f1f5
Expand Down

0 comments on commit 173b711

Please sign in to comment.