Skip to content

Commit

Permalink
feat: new release for flutter also
Browse files Browse the repository at this point in the history
  • Loading branch information
omariosouto committed Jul 25, 2022
1 parent 8416ad8 commit 20145e5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/skynexui_responsive_stylesheet.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
library responsive_stylesheet;

export 'responsive/responsive.dart';

/// A Calculator.
class Calculator {
/// Returns [value] plus 1.
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"clean": "flutter clean && yarn prebuild",
"release": "semantic-release",
"release:github_registry": "node ./scripts/publishToGHRegistry.js",
"release:flutter": "yarn clean && dart pub publish --force"
"release:flutter": "yarn clean && dart pub publish --force",
"bump:flutter": "node ./scripts/bumpFlutter.js",
"postversion": "yarn bump:flutter && git add ."
},
"devDependencies": {
"@babel/core": "7.16.0",
Expand Down
15 changes: 15 additions & 0 deletions scripts/bumpFlutter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const fs = require('fs');
const pkg = require('../package.json');

console.log(`[Bump Flutter to: ${pkg.version}]`);

const pubspecUpdated = fs
.readFileSync('./pubspec.yaml', { encoding: 'utf-8' })
.split('\n')
.map((line) => {
if (line.startsWith('version')) return `version: ${pkg.version}`;
return line;
})
.join('\n');

fs.writeFileSync('./pubspec.yaml', pubspecUpdated, { encoding: 'utf-8' });

0 comments on commit 20145e5

Please sign in to comment.