From 5ca6e99602d1c8bb87837813224b689a7bb27488 Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Fri, 7 Dec 2018 14:29:22 +0200 Subject: [PATCH 1/3] docs: update contributings doc --- CONTRIBUTING.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a32b87fa..1b18de389 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -225,8 +225,10 @@ git checkout release ``` 2. Create a PR to cut the release: ``` -git checkout -b release-version -git push --set-upstream origin release-version +export RELEASE_VERSION=version +export BRANCH="release-${RELEASE_VERSION}" +git checkout -b ${BRANCH} +git push --set-upstream origin ${BRANCH} ``` #### Merge master in release branch or cherry-pick commits. If the commits are in release branch **skip this step**. ``` @@ -266,9 +268,13 @@ git push git tag release-version git push --tags ``` -9. Merge PR into release branch. +9. Create a pull request +``` +curl -d '{"title": "release: cut the ${RELEASE_VERSION} release","body": "docs: update changelog","head": "${BRANCH}","base": "release"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}" +``` +10. Merge PR into release branch. -10. If all checks has passed publish package. +11. If all checks has passed publish package. ## Merge changes from release into master @@ -283,8 +289,9 @@ git pull ``` 2. Create PR to merge changes back in master and preserve history: ``` -git checkout -b merge-release-in-master -git push --set-upstream origin merge-release-in-master +export MERGE_BRANCH='merge-release-in-master' +git checkout -b ${MERGE_BRANCH} +git push --set-upstream origin ${MERGE_BRANCH} git merge origin/master ``` 3. Resolve conflicts. Choose to keep the version of master branch. If it is needed to revert versions of modules, see at the bottom. @@ -299,6 +306,11 @@ git commit git push ``` +6. Create pull request +``` +git curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "${MERGE_BRANCH}","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}" +``` + **If needed, revert version of modules and platform declarations to take the one from master:** ``` git checkout origin/master tns-platform-declarations/package.json tns-core-modules/package.json From 4feb453b569cab41103d7c8fcdb347d8564eee25 Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Fri, 7 Dec 2018 15:54:47 +0200 Subject: [PATCH 2/3] chore: update --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b18de389..fcd5c2f5e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -268,7 +268,7 @@ git push git tag release-version git push --tags ``` -9. Create a pull request +9. Create a pull request. Replace env variables ${RELEASE_VERSION} and ${BRANCH} with their values ``` curl -d '{"title": "release: cut the ${RELEASE_VERSION} release","body": "docs: update changelog","head": "${BRANCH}","base": "release"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}" ``` @@ -306,7 +306,7 @@ git commit git push ``` -6. Create pull request +6. Create pull request. Replace replace env ${MERGE_BRANCH} with its value ``` git curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "${MERGE_BRANCH}","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}" ``` From 05c842cd6736089af9f329b2bc3699733a7c66ac Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Fri, 7 Dec 2018 16:04:56 +0200 Subject: [PATCH 3/3] chore: typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fcd5c2f5e..2bdcb26be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -308,7 +308,7 @@ git push 6. Create pull request. Replace replace env ${MERGE_BRANCH} with its value ``` -git curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "${MERGE_BRANCH}","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}" +curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "merge-release-in-master","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}" ``` **If needed, revert version of modules and platform declarations to take the one from master:**