Skip to content

Commit

Permalink
Merge pull request #5 from atoulme/update_stage_task
Browse files Browse the repository at this point in the history
[chore] update release instructions
  • Loading branch information
atoulme authored Jun 4, 2023
2 parents 3de861a + fc2cee7 commit 7cec2be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 197 deletions.
99 changes: 3 additions & 96 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export ENABLE_SIGNING=true

### Close the staged repository for the release

Go to repository.apache.org and find the open repository that was created during the upload.
Go to oss.sonatype.org and find the open repository that was created during the upload.

Click "Close" in the workflow buttons at the top.

Expand All @@ -56,117 +56,24 @@ Go to github.com, click tags and find your release.

Edit the tag and add release notes.

Make sure to mark the release as "pre-release".

### Open a thread for a vote

Send an email to dev@tuweni.apache.org with the following:

Subject:[VOTE] Apache Tuweni ${RELEASE VERSION} release
```
We're voting on the source distributions available here:
https://dist.apache.org/repos/dist/dev/incubator/tuweni/${RELEASE VERSION}/
The release tag is present here:
https://github.com/apache/incubator-tuweni/releases/tag/v${RELEASE VERSION}-rc
Please review and vote as appropriate.
The following changes were made since ${PREVIOUS VERSION}:
${fill in changes}
```

The vote should be opened for at least 72 hours, longer if there is a week-end.

## Close the release

After the time of the vote has elapsed, close the vote thread with a recap showing the votes.

## Incubator general list

The next step is to email the general incubator list. If 3 IPMC votes were collected in the first vote, this is a notification.

If less than 3 votes were collected, this email is a new vote asking for more IPMC +1s.

## Close the vote

If a vote was called on the IPMC list, close it in the same fashion with a recap.

## Release on github

Go to github and mark the release as released. Change the tag name to drop the `-rc` at the end.

### Push the release to the dist final location

Move the files from `https://dist.apache.org/repos/dist/dev/incubator/tuweni/${RELEASE VERSION}/` to
`https://dist.apache.org/repos/dist/release/incubator/tuweni/${RELEASE VERSION}/`:
```bash
svn move -m "Move Apache Tuweni ${RELEASE VERSION} to releases" https://dist.apache.org/repos/dist/dev/incubator/tuweni/${RELEASE VERSION} https://dist.apache.org/repos/dist/release/incubator/tuweni/${RELEASE VERSION}
```

Make sure to remove old releases from the dist site as well, to avoid clogging the servers.

```bash
svn rm -m "Remove old Tuweni release" https://dist.apache.org/repos/dist/release/incubator/tuweni/OLD_RELEASE
```

### Release the artifacts to maven central

Go to repository.apache.org to the closed repository you closed during the RC process.
Go to oss.sonatype.org to the closed repository you closed during the RC process.

Click on it and press the release workflow button at the top.

### Publish the site

Go to the repository here and perform this change:

https://github.com/apache/incubator-tuweni-website/commit/77066736df2997991e3a1954f41ced1c7a52999d
https://github.com/tmio/tuweni-website/commit/77066736df2997991e3a1954f41ced1c7a52999d

Run ./publish.sh in the repository to publish the changes.

### Send an [ANNOUNCE] email

The email goes to dev@tuweni.apache.org, general@incubator.apache.org, and announce@apache.org.
This email must be sent from an @apache.org email.

```
Subject: [ANNOUNCE] Apache Tuweni (incubating) ${RELEASE VERSION} released
The Apache Tuweni team is proud to announce the release of Apache Tuweni
(incubating) ${RELEASE VERSION}.
Apache Tuweni is a set of libraries and other tools to aid development of
blockchain and other decentralized software in Java and other JVM
languages. It includes a low-level bytes library, serialization and
deserialization codecs (e.g. RLP), various cryptography functions
and primatives, and lots of other helpful utilities. Tuweni is
developed for JDK 11 or higher, and depends on various other FOSS libraries.
Source and binary distributions can be downloaded from:
https://tuweni.apache.org/download
Release notes are at:
https://github.com/apache/incubator-tuweni/releases/tag/v${RELEASE VERSION}
A big thank you to all the contributors in this milestone release!
To learn more about Tuweni and get started:
http://tuweni.apache.org/
Thanks!
The Apache Tuweni Team
----
Disclaimer: Apache Tuweni is an effort undergoing incubation at The Apache
Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is
required of all newly accepted projects until a further review indicates
that the infrastructure, communications, and decision making process have
stabilized in a manner consistent with other successful ASF projects. While
incubation status is not necessarily a reflection of the completeness or
stability of the code, it does indicate that the project has yet to be
fully endorsed by the ASF.
```

### Clean up github issues

If applicable mark the version as released.
Expand Down
106 changes: 5 additions & 101 deletions gradle/stage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,69 +80,6 @@ class StageBuildTask extends DefaultTask {
}
}

class SubversionStageTask extends DefaultTask {
@TaskAction
def run() {
if (!new File("_staged/$project.version-incubating").exists())
// create _staged folder
project.exec { commandLine "mkdir", "-p", "_staged" }

// create the folder in SVN where we will stage the binaries
project.exec {
commandLine "svn", "mkdir", "-m", "Add new Apache Tuweni folder for release $project.version", "https://dist.apache.org/repos/dist/dev/incubator/tuweni/$project.version-incubating", "--force-interactive"
}

// check out the SVN repository where we will store the binaries
project.exec {
commandLine "svn", "checkout", "https://dist.apache.org/repos/dist/dev/incubator/tuweni/$project.version-incubating", "_staged/$project.version-incubating", "--force-interactive"
}
}
}

class CopyStagedTask extends DefaultTask {

@TaskAction
def copy() {
// copy distributions over to the folder
project.exec {
commandLine "bash", "-c", "cp dist/build/distributions/tuweni-* _staged/$project.version-incubating/"
}

// add incubating to the version.
def fileNames = []
def fileOutput = new ByteArrayOutputStream()
project.exec {
commandLine "ls", "_staged/$project.version-incubating/"
standardOutput fileOutput
}
fileOutput.toString().split("\n").each {
fileNames.add([
it,
it.replace(project.version, "$project.version-incubating")
])
}

fileNames.each {
def src = it[0]
def target = it[1]
project.exec {
workingDir "_staged/$project.version-incubating/"
commandLine "mv", src, target
}
}

// now commit the staged files
project.exec {
workingDir "_staged/$project.version-incubating/"
commandLine 'bash', '-c', 'svn add tuweni-*'
}
project.exec {
workingDir "_staged/$project.version-incubating/"
commandLine 'svn', 'ci', '-m', "Add Apache Tuweni $project.version release candidate", "--force-interactive"
}
}
}

class GitStageTask extends DefaultTask {
@TaskAction
def run() {
Expand All @@ -154,37 +91,19 @@ class GitStageTask extends DefaultTask {
def branch = branchOutput.toString().trim()
// tag the repo
project.exec {
commandLine 'git', 'tag', '-m', "Release $project.version-incubating", "v$project.version-incubating-rc"
commandLine 'git', 'tag', '-m', "Release $project.version", "v$project.version-rc"
}
project.exec {
commandLine 'git', 'push', 'origin', branch, '--tags'
}
}
}

class EmailPromptTask extends DefaultTask {
@TaskAction
def run() {
println("""
To: dev@tuweni.apache.org
Subject:[VOTE] Tuweni $project.version-incubating release
We're voting on the source distributions available here:
https://dist.apache.org/repos/dist/dev/incubator/tuweni/$project.version-incubating/
The release tag is present here:
https://github.com/apache/incubator-tuweni/releases/tag/v$project.version-incubating-rc
This release includes the following changes:
// TODO fill changes
""")
}
}

class StageTask extends DefaultTask {

@TaskAction
def stage() {
project.exec { commandLine "./gradlew", "stageVerify", "stageBuild", "stageSVN", "stageCopy", "stageGitTag", "stageEmail" }
project.exec { commandLine "./gradlew", "stageVerify", "stageBuild", "stageGitTag" }
}
}

Expand All @@ -196,37 +115,22 @@ class StagePlugin implements Plugin<Project> {
Task stageTask = project.task("stage",
type: StageTask,
group: 'Build',
description: 'Stages Apache Tuweni.')
description: 'Stages Tuweni.')

Task verifyStage = project.task("stageVerify",
type: VerifyStageTask,
group: "Build",
description: 'Verifies Apache Tuweni can be staged.')
description: 'Verifies Tuweni can be staged.')

Task buildStage = project.task("stageBuild",
type: StageBuildTask,
group: "Build",
description: 'Builds Apache Tuweni to be staged.')

Task subversionStage = project.task("stageSVN",
type: SubversionStageTask,
group: "Build",
description: 'Creates staging folder on SVN and checks it out')

Task copyStage = project.task("stageCopy",
type: CopyStagedTask,
group: 'Build',
description: 'Copy over distributions to staged area and push them to SVN')
description: 'Builds Tuweni to be staged.')

Task gitStageTask = project.task("stageGitTag",
type: GitStageTask,
group: 'Build',
description: 'Tag in git the current stage')

Task emailPrompt = project.task("stageEmail",
type: EmailPromptTask,
group: 'Build',
description: 'Email example to console showing what to send')
}

void configureDependencies(final Project project) {
Expand Down

0 comments on commit 7cec2be

Please sign in to comment.