Skip to content

Commit

Permalink
Bump manifest version in fastlane
Browse files Browse the repository at this point in the history
  • Loading branch information
lautis committed Oct 17, 2020
1 parent f24f228 commit fd1f28b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
17 changes: 16 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ platform :mac do
zip_app
end

lane :sync_version_to_manifest do
['package.json', 'Refined GitHub Extension/manifest.json'].each do |file|
file_path = File.join(project_path, file)
data = JSON.parse(File.read(file_path))
data['version'] = marketing_version_number
File.write(file_path, JSON.pretty_generate(data, indent: ' ') + "\n")
end
end

lane :bump_version do
increment_build_number_in_xcodeproj
[APP_NAME, "#{APP_NAME} Extension"].each do |target|
Expand All @@ -107,7 +116,13 @@ platform :mac do
target: target
)
end
commit_version_bump(message: "Version #{marketing_version_number}")

sync_version_to_manifest

commit_version_bump(
message: "Version #{marketing_version_number}",
include: ['package.json', 'Refined GitHub Extension/manifest.json']
)
end

lane :github_release do
Expand Down
5 changes: 5 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ fastlane mac set_team
fastlane mac build_release
```

### mac sync_version_to_manifest
```
fastlane mac sync_version_to_manifest
```

### mac bump_version
```
fastlane mac bump_version
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "refined-github-safari",
"version": "2.0.5",
"version": "2.1.18",
"description": "Safari port of refined-github",
"main": "index.js",
"scripts": {
Expand All @@ -15,6 +15,8 @@
},
"author": "Ville Lautanala <lautis@gmail.com>",
"license": "ISC",
"dependencies": {},
"devDependencies": {}
"dependencies": {
},
"devDependencies": {
}
}

0 comments on commit fd1f28b

Please sign in to comment.