Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run a different hook command for each stage? #1024

Open
Lobosque opened this issue Sep 21, 2021 · 0 comments
Open

How to run a different hook command for each stage? #1024

Lobosque opened this issue Sep 21, 2021 · 0 comments

Comments

@Lobosque
Copy link

Lobosque commented Sep 21, 2021

Description

I want to run different build commands for my static website, depending on the stage.
The following does not work, because the ${stage} is empty, even when explicitly setting the stage via the --stage cli parameter:

org: lobosque
app: foo-frontend
name: vue-starter
component: website

inputs:
  domain: ${param:domain}
  src:
    src: ./src
    hook: npm run build-${stage}
    dist: ./dist

Result:

Deploying...

 Error: Failed running "src.hook": "npm run build-${stage}" due to the following error: Command failed: npm run build-${stage}
npm ERR! missing script: build-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant