From 173b711d138f83c1b8b7c15dfb9d879b0af0b8f5 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Tue, 10 Oct 2023 14:25:29 -0400 Subject: [PATCH] chore: run build_runner when building --- .github/composite/verify_cli_tags/action.yaml | 1 - .github/workflows/multibuild.yaml | 1 + packages/sshnoports/templates/docker/Dockerfile | 10 ++++++---- .../sshnoports/templates/docker/Dockerfile.activate | 8 +++++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/composite/verify_cli_tags/action.yaml b/.github/composite/verify_cli_tags/action.yaml index 1b1143aa7..cd68a4aed 100644 --- a/.github/composite/verify_cli_tags/action.yaml +++ b/.github/composite/verify_cli_tags/action.yaml @@ -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:]')" diff --git a/.github/workflows/multibuild.yaml b/.github/workflows/multibuild.yaml index 3f954bfd2..7b6e61fe1 100644 --- a/.github/workflows/multibuild.yaml +++ b/.github/workflows/multibuild.yaml @@ -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 diff --git a/packages/sshnoports/templates/docker/Dockerfile b/packages/sshnoports/templates/docker/Dockerfile index cf61b9d2a..77450fc55 100644 --- a/packages/sshnoports/templates/docker/Dockerfile +++ b/packages/sshnoports/templates/docker/Dockerfile @@ -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 diff --git a/packages/sshnoports/templates/docker/Dockerfile.activate b/packages/sshnoports/templates/docker/Dockerfile.activate index 7bd83297f..c6935abd6 100644 --- a/packages/sshnoports/templates/docker/Dockerfile.activate +++ b/packages/sshnoports/templates/docker/Dockerfile.activate @@ -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