-
Notifications
You must be signed in to change notification settings - Fork 15
Move repo to use a Makefile #169
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
Conversation
#### Problem The libraries repo has a lot of packages to run CI and commands against, and contains a pretty long list of commands in package.json, so it's a great candidate for moving to a Makefile. #### Summary of changes This is pretty similar to the others, except that I removed the "first word before - means directory" and instead flatten everything at the top-level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, except that some -js-% targets need to be moved to fix an ordering problem.
Makefile
Outdated
| format-check-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm format $(ARGS) | ||
|
|
||
| lint-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm lint $(ARGS) | ||
|
|
||
| test-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm build && pnpm test $(ARGS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: what do you think about lockfile strictness for pnpm installs?
| format-check-js-%: | |
| cd $(call make-path,$*) && pnpm install && pnpm format $(ARGS) | |
| lint-js-%: | |
| cd $(call make-path,$*) && pnpm install && pnpm lint $(ARGS) | |
| test-js-%: | |
| cd $(call make-path,$*) && pnpm install && pnpm build && pnpm test $(ARGS) | |
| format-check-js-%: | |
| cd $(call make-path,$*) && pnpm install --frozen-lockfile && pnpm format $(ARGS) | |
| lint-js-%: | |
| cd $(call make-path,$*) && pnpm install --frozen-lockfile && pnpm lint $(ARGS) | |
| test-js-%: | |
| cd $(call make-path,$*) && pnpm install --frozen-lockfile && pnpm build && pnpm test $(ARGS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't hurt!
Makefile
Outdated
| publish-js-%: | ||
| cd "$(call make-path,$*)" && pnpm install && pnpm version $(LEVEL) --no-git-tag-version $(call preid-arg,$(LEVEL),$(TAG)) && pnpm publish --no-git-checks --tag $(TAG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
| publish-js-%: | |
| cd "$(call make-path,$*)" && pnpm install && pnpm version $(LEVEL) --no-git-tag-version $(call preid-arg,$(LEVEL),$(TAG)) && pnpm publish --no-git-checks --tag $(TAG) | |
| publish-js-%: | |
| cd "$(call make-path,$*)" && pnpm install --frozen-lockfile && pnpm version $(LEVEL) --no-git-tag-version $(call preid-arg,$(LEVEL),$(TAG)) && pnpm publish --no-git-checks --tag $(TAG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You got it
Makefile
Outdated
| format-check-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm format $(ARGS) | ||
|
|
||
| lint-js-%: | ||
| cd $(call make-path,$*) && pnpm install && pnpm lint $(ARGS) | ||
|
|
||
| test-js-%: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ordering problem: the earlier patterns format-check- and test- match first, so they look for non-existent directories.
i.e.:
❯ make test-js-type-length-value-js
error: manifest path `js-type-length-value-js/Cargo.toml` does not exist
make: *** [test-js-type-length-value-js] Error 101
Solution:
- move
format-check-js-%andtest-js-%beforeformat-check-%andtest-%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah interesting! That must be the mac issue that @samkim-crypto noticed -- this works fine on Linux. Will fixup
rustopian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
Problem
The libraries repo has a lot of packages to run CI and commands against, and contains a pretty long list of commands in package.json, so it's a great candidate for moving to a Makefile.
Summary of changes
This is pretty similar to the others, except that I removed the "first word before - means directory" and instead flatten everything at the top-level.