-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add release checklist * add deploy and release scripts
- Loading branch information
1 parent
c528ae1
commit e954785
Showing
5 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Release Checklist | ||
|
||
Instructions to build a new release version of **Pelias** and deploy to [Maven Central][3]. | ||
|
||
### 0. Build & Deploy Release | ||
|
||
Ensure that you have set a CIRCLE_TOKEN environment variable. | ||
|
||
Run the deploy script with the release and new version specified like so: | ||
```bash | ||
$ ./scripts/deploy.sh 1.1.0 1.1.2-SNAPSHOT | ||
``` | ||
|
||
Verify snapshot build was successfully deployed to [Sonatype OSS Snapshots][1]. | ||
|
||
### 1. Promote Artifact on Maven Central | ||
|
||
Login to [Sonatype OSS Staging][2] and find the newly created staging repository. Select the repository and click "Close". Enter a description and click "Confirm". | ||
|
||
Example: | ||
|
||
> Promote artifact pelias-android-sdk-1.1.0 | ||
### 2. Release Artifact to Maven Central | ||
|
||
Login to [Sonatype OSS Staging][3] and find the promoted staging repository from step 2. Select the repository and click "Release". Enter a description and click "Confirm". | ||
|
||
Example: | ||
|
||
> Release artifact pelias-android-sdk-1.1.0 | ||
**Note: It may take up to two hours for new artifacts to appear in [Maven Central][3].** | ||
|
||
For more information see the official [Sonatype OSS Maven Repository Usage Guide][4]. | ||
|
||
### 3. Update Documentation | ||
|
||
Update the README download instructions to point to the newly released artifact. Add release notes and attach the artifact to the list of [releases][5]. | ||
|
||
[1]:https://oss.sonatype.org/#view-repositories;snapshots~browsestorage | ||
[2]:https://oss.sonatype.org/#stagingRepositories | ||
[3]:http://search.maven.org/ | ||
[4]:https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide | ||
[5]:https://github.com/pelias/pelias-android-sdk/releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Builds and uploads snapshot AARs to https://oss.sonatype.org/content/repositories/snapshots/com/mapzen/. | ||
# | ||
|
||
while read -r line || [[ -n "$line" ]]; do | ||
if [[ $line =~ .*version=.*-SNAPSHOT.* ]] | ||
then | ||
./gradlew uploadArchives -PsonatypeUsername=$SONATYPE_NEXUS_SNAPSHOTS_USERNAME \ | ||
-PsonatypePassword=$SONATYPE_NEXUS_SNAPSHOTS_PASSWORD | ||
break | ||
fi | ||
done < "gradle.properties" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# triggers circle build with parameters to trigger a release | ||
# | ||
|
||
if [ -z ${CIRCLE_TOKEN} ] | ||
then | ||
echo "[ERROR] CIRCLE_TOKEN environment variable is not set." | ||
exit 1 | ||
fi | ||
|
||
if [ $# -ne 2 ]; then | ||
echo "[ERROR] release and new version numbers not specified. Exiting." | ||
exit 1 | ||
fi | ||
|
||
trigger_build_url=https://circleci.com/api/v1/project/pelias/pelias-android-sdk/tree/master?circle-token=${CIRCLE_TOKEN} | ||
|
||
post_data=$(cat <<EOF | ||
{ | ||
"build_parameters": { | ||
"RELEASE_VERSION_NUMBER": "$1", | ||
"NEW_VERSION_NUMBER": "$2" | ||
} | ||
} | ||
EOF) | ||
curl \ | ||
--header "Accept: application/json" \ | ||
--header "Content-Type: application/json" \ | ||
--data "${post_data}" \ | ||
--request POST ${trigger_build_url} | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# runs the gradle release plugin | ||
# | ||
|
||
if ([ -z $RELEASE_VERSION_NUMBER ] || [ -z $NEW_VERSION_NUMBER ]); then | ||
echo "RELEASE_VERSION_NUMBER or NEW_VERSION_NUMBER not specified, skipping release." | ||
else | ||
echo "Releasing" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Mapzen Developer" | ||
./gradlew release -Prelease.useAutomaticVersion=true \ | ||
-Prelease.releaseVersion=$RELEASE_VERSION_NUMBER \ | ||
-Prelease.newVersion=$NEW_VERSION_NUMBER | ||
fi |