Skip to content

Commit

Permalink
fix: add flutter pubspec bump
Browse files Browse the repository at this point in the history
  • Loading branch information
omariosouto committed Jan 14, 2022
1 parent 1dd2b30 commit f7ab18a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GH_MASTER_TOKEN }}
run: |
echo '//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}' > ~/.npmrc
yarn bump:flutter
git add . && git commit -m "chore(release): bump flutter package version"
yarn release:github_registry
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"build": "rollup -c",
"release": "semantic-release",
"release:github_registry": "node ./scripts/publishToGHRegistry.js",
"bump:flutter": "node ./scripts/bumpFlutter.js",
"release:flutter": "flutter clean && dart pub publish",
"dev": "start-storybook -p 6006",
"build:storybook": "build-storybook -o dist-storybook",
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: skynexui_components
description: A set of components based in CSS specs for make your development easier and closer to React.
version: 1.9.15
version: 1.9.17
homepage: https://github.com/skynexui/components/

environment:
Expand Down
13 changes: 13 additions & 0 deletions scripts/bumpFlutter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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' });

1 comment on commit f7ab18a

@vercel
Copy link

@vercel vercel bot commented on f7ab18a Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.