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

Project command #387

Merged
merged 10 commits into from
May 24, 2024
Merged

Project command #387

merged 10 commits into from
May 24, 2024

Conversation

tlovett1
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Apr 10, 2024

🦋 Changeset detected

Latest commit: 0edf924

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
10up-toolkit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

setEnvVariables(variables);

if (fs.existsSync(variables.build_script_path)) {
execSync(`. ${__dirname}/bash/build-setup.sh; . ${variables.build_script_path}`, {

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium

This shell command depends on an uncontrolled
absolute path
.
packages/toolkit/scripts/project/deploy.js Fixed Show fixed Hide fixed

const initScript = `${__dirname}/bash/init.sh`;

execSync(`sh ${initScript}`, { stdio: 'inherit' });

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium

This shell command depends on an uncontrolled
absolute path
.
@nicholasio nicholasio changed the title WIP: Project command Project command May 20, 2024
ref: trunk
file: /main.yml

setup_10up_toolkit:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of cloning 10up-toolking and installing it from scratch why not use npx 10up-toolkit project init. npx will use by default the latest version in npm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course we'd need to release it first to be able to test this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100%. This will be removed once we release. Chicken and egg problem

build_plugins_and_themes:
stage: build
script:
- ./10up-toolkit project create-payload $CI_COMMIT_REF_NAME
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npx --yes 10up-toolkit project create-payload $CI_COMMIT_REF_NAME would make the previous stage to set up toolkit unnecessary as long as node is avaliable on the container.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

packages/toolkit/scripts/project/bash/init.sh Outdated Show resolved Hide resolved
packages/toolkit/scripts/project/build.js Show resolved Hide resolved
@nicholasio nicholasio merged commit dba1534 into develop May 24, 2024
7 checks passed
@nicholasio nicholasio deleted the project-command branch May 24, 2024 01:31
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

Successfully merging this pull request may close these issues.

2 participants