Fix patch version number in public build script

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
This commit is contained in:
Daniel Büchele
2018-07-11 08:36:03 -07:00
committed by Facebook Github Bot
parent a223edafaa
commit 2fa9cfe4e7

View File

@@ -1,5 +1,6 @@
{
"command": "SandcastleUniversalCommand",
"user": "__USER__",
"args": {
"name": "Release public Sonar build",
"oncall": "danielbuechele",
@@ -9,11 +10,6 @@
"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": "Create Version",
"required": true,
"shell": "cat ../xplat/sonar-public/package.json | jq -r '.version' | sed -E 's/[0-9]+$/__VERSION__/g' > $SANDCASTLE_NEXUS/VERSION"
},
{
"name": "Copy Sandcastle script",
"required": true,
@@ -22,12 +18,12 @@
{
"name": "Create build",
"required": true,
"shell": "cd ../xplat/sonar-public/scripts && ./sandcastle-build.sh $(cat $SANDCASTLE_NEXUS/VERSION)"
"shell": "cd ../xplat/sonar-public/scripts && ./sandcastle-build.sh __VERSION__"
},
{
"name": "Copy artifacts for syncing",
"required": true,
"shell": "cp -R ../xplat/sonar-public/dist/Sonar-mac.zip $SANDCASTLE_NEXUS/Sonar-mac.zip"
"shell": "cp -R ../xplat/sonar-public/dist/ $SANDCASTLE_NEXUS/"
},
{
"name": "Sync to local",
@@ -36,13 +32,13 @@
"to": "local",
"paths": [
"Sonar-mac.zip",
"VERSION"
"manifest.json"
]
},
{
"name": "Publish to github",
"required": true,
"shell": "curl -o RELEASE.json -x fwdproxy:8080 --silent --data '{ \"tag_name\": \"v'$(cat $SANDCASTLE_NEXUS/VERSION)'\", \"target_commitish\": \"master\", \"name\": \"v'$(cat $SANDCASTLE_NEXUS/VERSION)'\", \"body\": \"\", \"draft\": false, \"prerelease\": false}' https://api.github.com/repos/facebook/Sonar/releases?access_token=$(secrets_tool get SONAR_GITHUB_TOKEN)",
"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"
},
{
@@ -61,8 +57,8 @@
"hash": "master",
"report": [
{
"type": "chirp",
"users": ["__USER__"]
"type": "email",
"report_to_owner": true
}
]
}