Summary: Accidentally the version number passed to the build script was not only the patch number but the full semver-number. The build script is expecting a single number and there for ignored the version number that was passed. This caused the build to always have patch version 0. Reviewed By: priteshrnandgaonkar Differential Revision: D8804473 fbshipit-source-id: a116cac69066141fe8c8ed62020d16a1a7c40079
65 lines
2.3 KiB
JSON
65 lines
2.3 KiB
JSON
{
|
|
"command": "SandcastleUniversalCommand",
|
|
"user": "__USER__",
|
|
"args": {
|
|
"name": "Release public Sonar build",
|
|
"oncall": "danielbuechele",
|
|
"steps": [
|
|
{
|
|
"name": "Clone from GitHub",
|
|
"required": true,
|
|
"shell": "git -c http.proxy=fwdproxy:8080 -c https.proxy=fwdproxy:8080 clone https://github.com/facebook/Sonar.git ../xplat/sonar-public"
|
|
},
|
|
{
|
|
"name": "Copy Sandcastle script",
|
|
"required": true,
|
|
"shell": "cp ../xplat/sonar/scripts/sandcastle-build.sh ../xplat/sonar-public/scripts/sandcastle-build.sh"
|
|
},
|
|
{
|
|
"name": "Create build",
|
|
"required": true,
|
|
"shell": "cd ../xplat/sonar-public/scripts && ./sandcastle-build.sh __VERSION__"
|
|
},
|
|
{
|
|
"name": "Copy artifacts for syncing",
|
|
"required": true,
|
|
"shell": "cp -R ../xplat/sonar-public/dist/ $SANDCASTLE_NEXUS/"
|
|
},
|
|
{
|
|
"name": "Sync to local",
|
|
"step_type": "sync_step",
|
|
"from": "remote",
|
|
"to": "local",
|
|
"paths": [
|
|
"Sonar-mac.zip",
|
|
"manifest.json"
|
|
]
|
|
},
|
|
{
|
|
"name": "Publish to github",
|
|
"required": true,
|
|
"shell": "curl -o RELEASE.json -x fwdproxy:8080 --silent --data '{ \"tag_name\": \"v'$(cat $SANDCASTLE_NEXUS/manifest.json | jq -r .version_name)'\", \"target_commitish\": \"master\", \"name\": \"v'$(cat $SANDCASTLE_NEXUS/manifest.json | jq -r .version_name)'\", \"body\": \"\", \"draft\": false, \"prerelease\": false}' https://api.github.com/repos/facebook/Sonar/releases?access_token=$(secrets_tool get SONAR_GITHUB_TOKEN)",
|
|
"shell_type": "SandcastleLocalShell"
|
|
},
|
|
{
|
|
"name": "Upload",
|
|
"required": true,
|
|
"shell": "curl -x fwdproxy:8080 $(cat RELEASE.json | jq -r '.upload_url' | sed -e 's#{?name,label}##')'?access_token='$(secrets_tool get SONAR_GITHUB_TOKEN)'&name=Sonar.zip' --header 'Content-Type: application/zip' --upload-file $SANDCASTLE_NEXUS'/Sonar-mac.zip' -X POST",
|
|
"shell_type": "SandcastleLocalShell"
|
|
}
|
|
]
|
|
},
|
|
"alias": "sonar_release_public_build",
|
|
"capabilities": {
|
|
"vcs": "fbcode-fbsource",
|
|
"type": "lego-mac"
|
|
},
|
|
"hash": "master",
|
|
"report": [
|
|
{
|
|
"type": "email",
|
|
"report_to_owner": true
|
|
}
|
|
]
|
|
}
|