Skip to content

Commit

Permalink
- buildNumber is now truely optional
Browse files Browse the repository at this point in the history
- buildNumber handle decimal input
  • Loading branch information
hey24sheep committed Sep 22, 2021
1 parent 999103b commit fe53bd0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Build the given mobile application project. You must call the `Flutter Install`
* Select the `target` platform. Options are: `apk` (default), `aab`, `ios`, `ipa`, `web`, `all mobile` (all mobile platforms only), `desktop (windows)`, `desktop (macos)`, `desktop (linux)`, `all desktop` (all desktop platforms only) , `all` (all platforms).
* _(Optional)_. Set `flutterDirectory` to set path to the Flutter SDK if you were not using `Flutter Install` task before this one
* _(Optional)_. Set `buildName` (like `1.2.3`) that will override the manifest's one.
* _(Optional)_. Set `buildNumber` (like `12`) that will override the manifest's one.
* _(Optional)_. Set `buildNumber` (like `12`) that will override the manifest's one. Use `$(Build.BuildNumber)` to use build number as auto incremental number.
* _(Optional)_. Set `buildFlavour` (like `development`) to specify a build flavour. Must match Android Gradle flavor definition or XCode scheme.
* _(Optional)_. Set `entryPoint` to override the main entry point file of the application. Default is 'lib/main.dart'.
* _(Optional)_. Set `verboseMode` if you wish to get detailed verbose log output for diagnoses purposes. Default is `false`.
Expand Down
2 changes: 1 addition & 1 deletion publish-build-with-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ cd ../../
npm i -g tfx-cli
tfx extension create --manifest-globs vss-extension.json

# > Original Upload from https://marketplace.visualstudio.com/manage/publishers/aloisdeniel
# > Author https://marketplace.visualstudio.com/manage/publishers/hey24sheep
1 change: 0 additions & 1 deletion publish-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ cd ../../
# Create extension
tfx extension create --manifest-globs vss-extension.json

# > Original Upload from https://marketplace.visualstudio.com/manage/publishers/aloisdeniel
# > Author https://marketplace.visualstudio.com/manage/publishers/hey24sheep
3 changes: 3 additions & 0 deletions tasks/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ function main() {
let debugMode = task.getBoolInput('debugMode', false);
let buildName = task.getInput('buildName', false);
let buildNumber = task.getInput('buildNumber', false);
let buildNumberSplits = buildNumber.split('.');
// handle decimal, if buildNumber is like "1234.1"
buildNumber = buildNumberSplits[0];
let buildFlavour = task.getInput('buildFlavour', false);
let entryPoint = task.getInput('entryPoint', false);
let dartDefine = task.getInput('dartDefine', false);
Expand Down
3 changes: 3 additions & 0 deletions tasks/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ async function main(): Promise<void> {
let debugMode = task.getBoolInput('debugMode', false);
let buildName = task.getInput('buildName', false);
let buildNumber = task.getInput('buildNumber', false);
let buildNumberSplits = buildNumber.split('.');
// handle decimal, if buildNumber is like "1234.1"
buildNumber = buildNumberSplits[0];
let buildFlavour = task.getInput('buildFlavour', false);
let entryPoint = task.getInput('entryPoint', false);
let dartDefine = task.getInput('dartDefine', false);
Expand Down
4 changes: 2 additions & 2 deletions tasks/build/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 47
"Patch": 48
},
"groups": [],
"instanceNameFormat": "Flutter Build $(target)",
Expand Down Expand Up @@ -90,7 +90,7 @@
"name": "buildNumber",
"type": "string",
"label": "Package build number",
"defaultValue": "$(Build.BuildNumber)",
"defaultValue": "",
"required": false,
"helpMarkDown": "An identifier used as an internal version number. Each build must have a unique identifier to differentiate it from previous builds."
},
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifestVersion": 1,
"id": "flutter",
"version": "0.2.59",
"version": "0.2.60",
"name": "Flutter Tasks",
"description": "Flutter extension for Azure DevOps. Install, build, analyze, command and env tasks for easier Flutter DevOps.",
"publisher": "hey24sheep",
Expand Down

0 comments on commit fe53bd0

Please sign in to comment.