Skip to content

Commit 20fed7f

Browse files
committed
✏️ Don't mix update and upgrade
1 parent 1f59679 commit 20fed7f

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

bin/main.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ final AlfredUpdater updater = AlfredUpdater(
3535
updateInterval: Duration(days: 7),
3636
);
3737
bool verbose = false;
38-
bool upgrade = false;
38+
bool update = false;
3939

4040
void main(List<String> arguments) async {
4141
try {
@@ -46,12 +46,12 @@ void main(List<String> arguments) async {
4646
final ArgParser parser = ArgParser()
4747
..addOption('query', abbr: 'q', defaultsTo: '')
4848
..addFlag('verbose', abbr: 'v', defaultsTo: false)
49-
..addFlag('upgrade', abbr: 'u', defaultsTo: false);
49+
..addFlag('update', abbr: 'u', defaultsTo: false);
5050
final ArgResults args = parser.parse(arguments);
5151

52-
upgrade = args['upgrade'];
53-
if (upgrade) {
54-
stdout.writeln('Upgrading workflow...');
52+
update = args['update'];
53+
if (update) {
54+
stdout.writeln('Updating workflow...');
5555

5656
return await updater.update();
5757
}
@@ -78,17 +78,17 @@ void main(List<String> arguments) async {
7878
workflow.addItem(AlfredItem(title: err.toString()));
7979
if (verbose) rethrow;
8080
} finally {
81-
if (!upgrade) {
81+
if (!update) {
8282
if (await updater.updateAvailable()) {
83-
workflow.run(addToBeginning: upgradeItem);
83+
workflow.run(addToBeginning: updateItem);
8484
} else {
8585
workflow.run();
8686
}
8787
}
8888
}
8989
}
9090

91-
const upgradeItem = AlfredItem(
91+
const updateItem = AlfredItem(
9292
title: 'Auto-Update available!',
9393
subtitle: 'Press <enter> to auto-update to a new version of this workflow.',
9494
arg: 'update:workflow',

bin/src/constants/config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Config {
22
Config._();
33

4-
static const String version = '1.0.3';
4+
static const String version = '1.0.4';
55
static final Uri githubRepositoryUrl =
66
Uri.https('github.com', '/techouse/alfred-gitmoji');
77
static const String algoliaApplicationId = 'WODHKE4WZG';

info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<key>escaping</key>
7676
<integer>102</integer>
7777
<key>script</key>
78-
<string>./gm --upgrade</string>
78+
<string>./gm -u</string>
7979
<key>scriptargtype</key>
8080
<integer>1</integer>
8181
<key>scriptfile</key>
@@ -251,7 +251,7 @@
251251
<key>variablesdontexport</key>
252252
<array/>
253253
<key>version</key>
254-
<string>1.0.3</string>
254+
<string>1.0.4</string>
255255
<key>webaddress</key>
256256
<string>https://github.com/techouse</string>
257257
</dict>

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Search for gitmojis and copy them to the clipboard easily.
44
# Prevent accidental publishing to pub.dev.
55
publish_to: 'none'
66

7-
version: 1.0.3
7+
version: 1.0.4
88

99
environment:
1010
sdk: '>=2.16.1 <3.0.0'

0 commit comments

Comments
 (0)