Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Update releasing script and notes
Browse files Browse the repository at this point in the history
  • Loading branch information
carmenlau committed Feb 28, 2020
1 parent 0f9e956 commit 10a9746
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 128 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ fmt:

.PHONY: update-version
update-version:
sed -i "" "s/version = \".*\"/version = \"v$(SKYGEAR_VERSION)\"/" pkg/server/skyversion/version.go
sed -i "" "s/const MajorVersion = .*/const MajorVersion = $(shell echo $$SKYGEAR_VERSION | cut -d . -f 1)/" pkg/core/apiversion/apiversion.go
sed -i "" "s/const MinorVersion = .*/const MinorVersion = $(shell echo $$SKYGEAR_VERSION | cut -d . -f 2)/" pkg/core/apiversion/apiversion.go

.PHONY: docker-build-image
docker-build-image:
Expand Down
122 changes: 1 addition & 121 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
- Upload `py-skygear` to PyPI as `skygear`
- Docker Hub automatically build `skygeario/py-skygear` triggered by git push
- Upload `skygear-SDK-iOS` to [CocoaPods](https://cocoapods.org/pods/SKYKit) as `SKYKit`
- Upload `skygear-SDK-JS` to [npm](https://www.npmjs.com/package/skygear) as `skygear`
- Upload `skygear-SDK-Android` to [jcenter](https://bintray.com/skygeario/maven/skygear-android)

## Version number

Version number conforms to `x.y.z` format. For each release cycle, `y`
Expand All @@ -18,8 +12,7 @@ by 1 and `z` is reset to 0 on the next release cycle.

```shell
$ export GITHUB_TOKEN=abcdef1234 # Need Repos scope for update release notes
$ export SKYGEAR_VERSION="0.5.0"
$ export KEY_ID="12CDA17C"
$ export SKYGEAR_VERSION="2.1.0"

$ brew install github-release
$ brew install gpg2
Expand All @@ -46,119 +39,6 @@ $ git push --follow-tags git@github.com:SkygearIO/skygear-server.git master v$SK
## Click `Publish release` in github release page
```

### py-skygear

```shell
## Draft new release changelog
$ git log --first-parent `git describe --abbrev=0`.. > new-release
$ edit new-release

## Update changelog, version, release commit and tag
$ make release-commit

### For alpha
## git commit -m "Bump for for $SKYGEAR_VERSION"

### If the release is latest (official release with the highest version number)
$ git tag -f latest && git push git@github.com:SkygearIO/py-skygear.git :latest
$ git push --follow-tags git@github.com:SkygearIO/py-skygear.git master v$SKYGEAR_VERSION latest

## Release to pypi (Only for official release)
$ python3 setup.py sdist upload

## Click `Publish release` in github release page
```

### skygear-SDK-iOS

**IMPORTANT**: Note that CocoaPods does not allow tag prefixed with `v`.
Therefore the tag name is different from other projects.

**IMPORTANT**: CocoaPods requires that that tag is pushed to repository before
it will accept a new release.

```shell
## Draft new release changelog
$ git log --first-parent `git describe --abbrev=0`.. > new-release
$ edit new-release

## Update changelog, version, release commit and tag
$ make release-commit

### If the release is latest (official release with the highest version number)
$ git tag -f latest && git push git@github.com:SkygearIO/skygear-SDK-iOS.git :latest
$ git push --follow-tags git@github.com:SkygearIO/skygear-SDK-iOS.git master $SKYGEAR_VERSION latest

## Push commit to Cocoapods (Only for official release)
$ pod trunk push SKYKit.podspec --allow-warnings

## Click `Publish release` in github release page
```

### skygear-SDK-JS

```shell
## Draft new release changelog
$ git log --first-parent `git describe --abbrev=0`.. > new-release
$ edit new-release

## Update changelog, verion, release commit and tag
$ make release-commit

### For alpha
## git commit -m "Bump for for $SKYGEAR_VERSION"

### If the release is latest (official release with the highest version number)
$ git tag -f latest && git push git@github.com:SkygearIO/skygear-SDK-JS.git :latest
$ git push --follow-tags git@github.com:SkygearIO/skygear-SDK-JS.git master v$SKYGEAR_VERSION latest

## Release to npm (Only for official release)
$ npm run lerna exec 'npm publish'
## You will prompt for OTP in each package if you enabled 2FA
## For publishing to alpha channel
$ npm run lerna publish -- --skip-git --npm-tag=alpha --repo-version $SKYGEAR_VERSION

## Click `Publish release` in github release page
```

### skygear-SDK-Android

```shell
## Draft new release notes
$ git log --first-parent `git describe --abbrev=0`.. > new-release
$ edit new-release

## Update changelog, version, release commit and tag
$ make release-commit

### If the release is latest (official release with the highest version number)
$ git tag -f latest && git push git@github.com:SkygearIO/skygear-SDK-Android.git :latest
$ git push --follow-tags git@github.com:SkygearIO/skygear-SDK-Android.git master $SKYGEAR_VERSION latest

## Click `Publish release` in github release page
```

### skycli

```shell
## Draft new release changelog
$ git log --first-parent `git describe --abbrev=0`.. > new-release
$ edit new-release
$ github-release release -u skygeario -r skycli --draft --tag v$SKYGEAR_VERSION --name "v$SKYGEAR_VERSION" --pre-release --description "`cat new-release`"

## Update changelog
$ cat CHANGELOG.md >> new-release && mv new-release CHANGELOG.md
$ git add CHANGELOG.md
$ git commit -m "Update CHANGELOG for v$SKYGEAR_VERSION"

## Tag and push commit
$ git tag -a v$SKYGEAR_VERSION -s -u $KEY_ID -m "Release v$SKYGEAR_VERSION"
$ git push --follow-tags origin v$SKYGEAR_VERSION
$ git push origin

## Click `Publish release` in github release page
```

## Other notes

To show tag info:
Expand Down
8 changes: 2 additions & 6 deletions scripts/release-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ if [ -z "$GITHUB_TOKEN" ]; then
>&2 echo "GITHUB_TOKEN is required."
exit 1
fi
if [ -z "$KEY_ID" ]; then
>&2 echo "KEY_ID is required."
exit 1
fi
if [ -e "new-release" ]; then
echo "Making release commit and github release..."
else
Expand All @@ -21,6 +17,6 @@ fi
github-release release -u skygeario -r skygear-server --draft --tag v$SKYGEAR_VERSION --name "v$SKYGEAR_VERSION" --description "`cat new-release`"
echo "" >> new-release && cat CHANGELOG.md >> new-release && mv new-release CHANGELOG.md
make update-version SKYGEAR_VERSION=$SKYGEAR_VERSION
git add CHANGELOG.md pkg/server/skyversion/version.go
git add CHANGELOG.md pkg/core/apiversion/apiversion.go
git commit -m "Update CHANGELOG for v$SKYGEAR_VERSION"
git tag -a v$SKYGEAR_VERSION -s -u $KEY_ID -m "Release v$SKYGEAR_VERSION"
git tag -a v$SKYGEAR_VERSION -s -m "Release v$SKYGEAR_VERSION"

0 comments on commit 10a9746

Please sign in to comment.