๋ฒ๊ทธ ์ค๋ช
https://github.com/react-native-community/hooks ๋ฆฌํฌ์งํ ๋ฆฌ์์ ์๋์ ์ค์ ํ์ต๋๋ค. ์ฐ๋ฆฌ๋ ์ ํ ์๋ค lerna.json
ํ์ผ์, ๋ด๊ฐ ์คํํ๋ฉด yarn auto changelog --verbose
, ๋๋ ์ค๋ฅ ๋ฑ์ผ๋ก ์ป์ ์
โ success Calculated SEMVER bump: patch
โน info Calculated next version to be: 2.0.3
โน info Old changelog exists, prepending changes.
โน info Wrote new changelog to filesystem.
โน info Getting commits from 2.0.2 to HEAD
โน info Committed new changelog.
โ error Called from: Error
at Object.execPromise [as default] (/Users/pvinis/Source/react-native-community/hooks/node_modules/@auto-it/core/dist/utils/exec-promise.js:15:22)
at Object.getLernaPackages (/Users/pvinis/Source/react-native-community/hooks/node_modules/@auto-it/core/dist/utils/get-lerna-packages.js:7:34)
at /Users/pvinis/Source/react-native-community/hooks/node_modules/@auto-it/all-contributors/dist/index.js:82:48
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Running command 'npx' with args [lerna, ls, -pl] failed
npx: installed 706 in 55.72s
lerna notice cli v3.20.2
lerna ERR! ENOLERNA `lerna.json` does not exist, have you run `lerna init`?
at ChildProcess.<anonymous> (/Users/pvinis/Source/react-native-community/hooks/node_modules/@auto-it/core/dist/utils/exec-promise.js:49:24)
at ChildProcess.emit (events.js:321:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
์ฌํํ๊ธฐ ์ํด
์์๋๋ ํ๋
๋ฆฌํฌ์งํ ๋ฆฌ์ lerna๊ฐ ๊ตฌ์ฑ๋์ด ์์ง ์์ผ๋ฉด ํ์ํ์ง ์๊ฑฐ๋ ์ฐพ์๋ณด๊ณ ์ค๋ฅ๊ฐ ๋ฐ์ํด์๋ ์ ๋ฉ๋๋ค.
์คํฌ๋ฆฐ์ท
๋ฐ์คํฌํ(๋ค์ ์ ๋ณด๋ฅผ ์์ฑํ์ญ์์ค):
์ถ๊ฐ ์ปจํ ์คํธ
์ง์ ์ด ์๋์? ์ด๋ ๊ฒ๋์ด ๋ฏธ์ํฉ๋๋ค. ์ด์ ๋ฒ์ ์์ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ค๊ณ ์๊ฐํ์ต๋๋ค.
ํ์ฌ ๊ทํ์ ๋ฆฌํฌ์งํ ๋ฆฌ๋ก ์ฌ์์ฐํ ์ ์์ต๋๋ค.
์ ์ฅ์์ ๋ง์คํฐ์์ ์ค๋ฅ ์์ด ๋ค์์ ์ํํ์ต๋๋ค.
yarn add auto
yarn auto changelog --from 2.0.1 -d
์ฐ์ถ:
#### ๐ Enhancement
- trying out auto [#60](https://github.com/react-native-community/hooks/pull/60) ([@pvinis](https://github.com/pvinis))
#### ๐ Bug Fix
- Update README.md [#61](https://github.com/react-native-community/hooks/pull/61) ([@pvinis](https://github.com/pvinis))
- Create LICENSE [#57](https://github.com/react-native-community/hooks/pull/57) ([@pvinis](https://github.com/pvinis))
#### โ ๏ธ Pushed to master
- aha ([@pvinis](https://github.com/pvinis))
- fix(sad): its a sad day when you cant make your tools do what you want. ([@pvinis](https://github.com/pvinis))
- fix(bla) ok ([@pvinis](https://github.com/pvinis))
- rename ([@pvinis](https://github.com/pvinis))
- fix(something): i hate this ([@pvinis](https://github.com/pvinis))
- again ([@pvinis](https://github.com/pvinis))
- bla ([@pvinis](https://github.com/pvinis))
- i give up.. ([@pvinis](https://github.com/pvinis))
- try ([@pvinis](https://github.com/pvinis))
- bump ([@pvinis](https://github.com/pvinis))
- upg ([@pvinis](https://github.com/pvinis))
- test ([@pvinis](https://github.com/pvinis))
- some baaaasic tests ([@pvinis](https://github.com/pvinis))
- rename repo to be canonical with the rest and fix links ([@pvinis](https://github.com/pvinis))
#### Authors: 1
- Pavlos Vinieratos ([@pvinis](https://github.com/pvinis))
๐ญ ๋ช๋ถ์ ์ ์ฒญ์ํ์ด์ ๐คฆโโ๏ธ.
๋ด์ผ ์ง์ ์์ ๋ค์ ๋ง๋ค ์ ์์ง๋ง ์ฌ๊ธฐ์ ๋ด๊ฐ ์์๋ธ ๊ฒ์ ๋์ดํ๊ฒ ์ต๋๋ค.
์๋ ๋ฐ ๋ชจ๋ ๊ธฐ์ฌ์๋ฅผ ์ถ๊ฐํ์ต๋๋ค. ๊ทธ๋ฐ ๋ค์ ์๋ shipit์ ์๋ํ๊ณ ๋๋ผ์ด ๋ฐ์ ์ฌ์ฉํด๋ lerna ์ค๋ฅ๋ก ์ธํด ์คํจํ์ต๋๋ค.
๊ทธ๋ฐ ๋ค์ ๋ชจ๋ ๊ธฐ์ฌ์๋ฅผ ์ ๊ฑฐํ๊ณ ์์ด ์๋ํ์ต๋๋ค. ๋ ๊ฐ์ง ๋ฌธ์ ๊ฐ ์์์ต๋๋ค. ํ๋๋ ci๊ฐ GitHub.com์ด ์น์ธ๋์ง ์์ ip ๋๋ ๋ฌด์์ธ๊ฐ์ ๋ํด ๋ถํํ๋ค๋ ๊ฒ์ ๋๋ค. package.json์ ์ ์ฅ์์์ https๋ก ์ ํํ์ง๋ง ๋์์ด ๋์ง ์์์ต๋๋ค. ๋ค๋ฅธ ๋ฌธ์ ๋ gh ๋ฆด๋ฆฌ์ค ๋ฐ ํ๊ทธ๊ฐ ๋ฐ์ํ์ง ์๋๋ค๋ ๊ฒ์ ๋๋ค. ์ด๋ ์์ ์์ ๋๋ package.json์ ํ๋์ ๋ฒ์ ๋ฒํธ๋ฅผ ๊ฐ์ง๊ณ ์๊ณ , ๋ค๋ฅธ ํ๋๋ ํ๊ทธ๋ก ์์ฑํ๋ ค๊ณ ์๋ํ์ผ๋ฉฐ, ์ธ ๋ฒ์งธ๋ npm ๋ฆด๋ฆฌ์ค์์ต๋๋ค. ์ธ ๊ฐ์ ์ซ์๊ฐ ๋ชจ๋ ๋ฌ๋ผ์ ๋ง์ด ํท๊ฐ๋ ค ํฌ๊ธฐํ์ต๋๋ค.
๋ด์ผ ๋ค์ ๋ง๋ค๊ฒ ์ต๋๋ค. ์ฃ์กํ๊ณ ๊ฐ์ฌํฉ๋๋ค.
. ํ๋๋ ci๊ฐ GitHub.com์ด ์น์ธ๋์ง ์์ ip ๋๋ ๋ฌด์์ธ๊ฐ์ ๋ํด ๋ถํํ๋ค๋ ๊ฒ์ ๋๋ค.
https://github.com/intuit/auto/blob/master/.circleci/config.yml#L99
์ด๊ฒ์ ๋ด๊ฐ ์๊ฐํ๋ ๋ฌธ์์๋ ์์ต๋๋ค. ๋ค์ ์ด์ด ์ฃผ์ #550์ ์ ๋ ฅํด์ผ ํ ์๋ ์์ต๋๋ค.
'from'๊ณผ 'd' ์์ด ์๋ํฉ๋๊น?
๋ค ๊ทธ๋ฅ ์๋ฌด๊ฒ๋ ์ถ๋ ฅํ์ง ์์ต๋๋ค
PR์ ๋ชจ์์ ์๋์ผ๋ก ์ค์ ํด ๋ณด๊ฒ ์ต๋๋ค. ๋ ์๊ฐ ๊ด์ฐฎ์. ํ ํฐ์ด ์ด๋ฏธ ์ค์ ๋์ด ์๋ ํ ๊ฝค ์ฝ๊ฒ ํ ์ ์์ต๋๋ค.
ํ ์ด์ํด. ์ข์, ์ ์ผํ ๋ฐฉ๋ฒ์ ์ํ์ ๋ค์ ๋ฐ๋ ๊ฒ๋ฟ์ ๋๋ค. ๊ด์ฐฎ์ผ๋ฉด reflog๋ฅผ ์ํํ๊ณ ๋ด์ผ ๋ถ๊ธฐ์ ํธ์ํ๊ฒ ์ต๋๋ค.
ci์๋ ํ ํฐ์ด ์ค์ ๋์ด ์์ต๋๋ค. ๊ทธ๊ฒ์ ๋๋ผ์ด ๊ฒ์ ๋๋ค. ๋ ์ง์ ์ ์ธ ์ฑํ ์ ์ํด discord ๋๋ ๋ฌด์ธ๊ฐ์ ๋ํด ์ด์ผ๊ธฐํ๊ณ ์ถ์ต๋๊น? ์ฌ๊ธฐ๊ฐ ์๋ฒฝ 1์ 26๋ถ์ธ๋ฐ ์ ๋ง ๊ธด ํ๋ฃจ์์ต๋๋ค ๐ฌ
์๋ฌ ๊ฐ! hooks
ํจ๊ป PR์ ๋ฐ๊ณ ๋ด์ผ(๋๋ ์ธ์ ๋ ์ง) ํฝ์
ํ ์ ์์ต๋๋ค. ์ฌ๊ธฐ์ ์ฑํ
ํด๋ ๊ด์ฐฎ์ต๋๋ค. ๋๋ ๊ณต๊ฐ ํ ๋ก ์ ์ข์ํ๋ค
์ ๋ฅผ repo์ ๊ณต๋ ์์ ์๋ก ์ถ๊ฐํ ์ ์๋ค๋ฉด ๊ทธ๊ฒ๋ ์๋ฒฝํ ๊ฒ์ ๋๋ค. git ํ๊ทธ๋ง ์ถ๊ฐํ๋ฉด ๋ฉ๋๋ค(์๋ง๋).
#969 ์ฌ์ฉ์๊ฐ ์๋ @pvinis ๋ ์๋ ค์ง ํธ์คํธ ๋ฌธ์ ์ https
url ๋๋ https + token
์ธ์ฆ์ ์๋ํฉ๋๋ค.
๋น์ ์ ํ๋ ฅ์๋ก ์ด๋ํ์ต๋๋ค.
์ข์, ๊ทธ๋์ ๋๋ ๋น์ ์ PR์ ๋ณํฉํ์ต๋๋ค. ๋ฐ๋งค ๋ผ๋ฒจ ์์ด PR์ ํ๋๋ฐ ์นด๋๋ฆฌ์๋ง ๋ง๋ค์์ด์. ๋๋ ๋ฆด๋ฆฌ์ค ๋ ์ด๋ธ๋ก PR์ํ๊ณ canary๊ฐ ์๋ํ๊ณ ๋ณํฉ ํ ๋ค์ lerna ๋ฌธ์ https://app.circleci.com/jobs/github/react-native-community/hooks/114 ๋ฐ https://app.circleci.com /jobs/github/react-native-community/hooks/130.
๋ํ ์ด์ํ๊ฒ๋ ๊ตฌ์ฑ์ ํ์ผ๋ก ์ฎ๊ฒผ์ ๋ https://github.com/react-native-community/hooks/commit/aaca764128470a1096f84a0bf493a746a2fe5168 ์ ๋์ฌ ๐ค git ํ๊ทธ๊ฐ ์ถ๊ฐ๋์์ต๋๋ค.
์ ๋ฐ ์กฐ์ฌ
์ฐ๋ฆฌ๋ ์ธ๊ณ์ ๋ค๋ฅธ ์ธก๋ฉด์ def
๐ ๊ณผ์ฐ. ๊ทธ๋ฌ๋ ๋๋ ์ ์ ๋์ ๋ ์์ต๋๋ค. ๋น์ ์ด ํ์๋กํ๋ ๊ฒ์ด ์์ผ๋ฉด ๋น์ ์ ๋์ธ ์ ์์ต๋๋ค. ํ ์๊ฐ ์ ๋๋ฉด ์๊ฐ์ด ์์ต๋๋ค.
๋ฐ๋ผ์ ํ๊ทธ๋ฅผ ํธ์ง/์ญ์ ํ ์ ์๋๋ก ์ค์ ๋ก ๊ด๋ฆฌ์๊ฐ ํ์ํ๋ค๊ณ ์๊ฐํฉ๋๋ค. ๋ํ:
๋จ์ผ ํจํค์ง์ ๋ํ ๋ชจ๋ ๊ธฐ์ฌ์ ํ๋ฌ๊ทธ์ธ์ ์์ ํ๋ ๋ฒ๊ทธ ์์ ์ด ์์ต๋๋ค. https://github.com/intuit/auto/pull/971
noVersionPrefix
์ฌ์ฉ์ ์ ๊ฑฐํด์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค.
.npmrc
ํฌํจ ๋ tag-version-prefix=""
(์๋ ํ๋ก์ธ์์ ๋ํ ๋ณ๊ฒฝ์ํ๋ ๊ฒ์์ด ๋ฐ์ผ๋ก ์ ํ๋ฅผ)๊ฐ์ฅ ์ข์ ๋ฐฉ๋ฒ์ ํ๊ทธ์ v
๋ฅผ ๋ฃ๋ ๊ฒ์
๋๋ค. ๋ ์ ์ ์ค์ ๊ณผ ๋ ๋ง์ ํ์ค
์ํ๋๋๋ก ํ๊ทธ๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค. ๋ค, ์ ๋ v์ ๋ํด ๊ทธ๋ ๊ฒ ์๊ฐํ์ต๋๋ค. ์ ๋ ๊ทธ๊ฒ์ ์ข์ํ์ง ์์ง๋ง ๋ง์ฐฐ์ด ๋ํ๋ค๊ณ ์๊ฐํฉ๋๋ค.
์ข์, ์ ๋์ฌ ๊ตฌ์ฑ์ ์ ๊ฑฐํ๊ณ ์ด์ v2.4.2
๊ฐ ์์ผ๋ฏ๋ก lerna ์์ ์ด ์๋ฃ๋ ํ ์
๊ทธ๋ ์ด๋ํ ์ ์๊ณ ๊ทธ๊ฒ ๋ค ๐ค์ฌ์ผ ํฉ๋๋ค.
๋๋ ๋น์ ์ ์ํด ์ด๊ธฐ์ ๋ชจ๋ ๊ธฐ์ฌ์ ์น์ ์ ๋ง๋ค๊ณ ์์ต๋๋ค. pr์ ์ ๋ฒ์ ๊ณผ ํจ๊ป ์ ๊ณต๋ฉ๋๋ค.
autorc์์ onlyPublishWithReleaseLabel
. auto.config.js์์ onlyPublishWithReleaseLabel
๋๋ only-publish-with-release-label
์
๋๊น?
ํ๋๊ทธ๋ ์ผ๋ฐฅ ์ผ์ด์ค์ด๊ณ ์๋ rc์์๋ camelCase์ ๋๋ค.
ํจ๊ณผ๊ฐ ์์๋ค! ๊ทธ๋์ ๊ทธ๊ฒ์ lerna์ ๋ฒ์ ์ ๋์ฌ์์ต๋๋ค.
์ ์ฅ, ๋์๊ณผ ์ด ๋๊ตฌ์ ๋ํด ์ ๋ง ๊ฐ์ฌํฉ๋๋ค! ์ ๋ ์คํ ์์ค์ ๊ด๋ จ๋ ์ฌ๋๋ค์ ์ฌ๋ํฉ๋๋ค.
auto
ํ๊ณ ๋ชจ๋์๊ฒ ๋ ๋์ ์๋น์ค๋ฅผ ์ ๊ณตํ ์ ์๋๋ก ๋์์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค. ์ ๋ ํญ์ ์๋ก์ด ๊ฐ๋ฐ์๊ฐ ์ด๋ ค์ด ๋ถ๋ถ์ ๋ถ๋ชํ ๋ ๋๊ตฌ๋ฅผ ๊ฐ์ ํ๋ ค๊ณ ๋
ธ๋ ฅํฉ๋๋ค.
#971์ ํตํด ํ์
.js
ํ์ผ https://intuit.github.io/auto/pages/autorc.html์ ์ง์ํ์ง ์๋๋ค๊ณ ์๊ฐํฉ๋๋ค json
๋๋ yml
. ์ด๊ฒ์ GitHub ๋ด๊ณผ ๊ด๋ จ๋ ์ด์ ์
๋๋ค. @zephraph ๊ฐ ๋ ์์ธํ ์ค๋ช
ํ ์ ์์ต๋๋ค.
์. ์ด๋์ ๊ฐ cosmicconfig๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ ๋ณธ ๊ฒ ๊ฐ์์. ์, json์ .autorc
์
๋๋ค.
์, js ํ์ผ์ JSON/yml ํ์ผ๊ณผ ๊ฐ์ ๋ฐฉ์์ผ๋ก ์ ์ ์ผ๋ก ๋ถ์ํ ์ ์๊ธฐ ๋๋ฌธ์ ์๋ํ๋ฅผ ๊ตฌ์ถํ๊ธฐ๊ฐ ์ด๋ ต์ต๋๋ค.