Skip to content

Commit

Permalink
Added GitHub lastest release check with -v option
Browse files Browse the repository at this point in the history
  • Loading branch information
frossm committed Feb 1, 2021
1 parent 50ea623 commit 5b76957
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.fross</groupId>
<artifactId>rpncalc</artifactId>
<version>2.1.1</version>
<version>2.2.0</version>
<packaging>jar</packaging>

<name>rpncalc</name>
Expand Down Expand Up @@ -181,7 +181,7 @@
<dependency>
<groupId>org.fross</groupId>
<artifactId>library</artifactId>
<version>2020.12.23</version>
<version>2021.02.01</version>
</dependency>

</dependencies>
Expand Down
10 changes: 7 additions & 3 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rpncalc
version: '2.1.1'
version: '2.2.0'
summary: The command line Reverse Polish Notation (RPN) calculator
description: |
RPNCalc is an easy to use command line based Reverse Polish
Expand All @@ -9,7 +9,7 @@ grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
base: core18

# Enable faszter LZO compression
# Enable faster LZO compression
compression: lzo

apps:
Expand All @@ -21,7 +21,7 @@ parts:
plugin: maven
source: https://github.com/frossm/library.git
source-type: git
source-tag: 'v2020.12.23'
source-tag: 'v2021.02.01'
maven-options: [install]

rpncalc:
Expand All @@ -30,3 +30,7 @@ parts:
source-branch: master
source-type: git
after: [library]

plugs:
rpncalc-network:
interface: network
4 changes: 2 additions & 2 deletions src/main/java/org/fross/rpncalc/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* RPNCalc is is an easy to use console based RPN calculator
*
* Copyright (c) 2013-2020 Michael Fross
* Copyright (c) 2013-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -57,7 +57,7 @@ public static void Display() {
Output.printColorln(Ansi.Color.WHITE, " -a [lrd] Alignment of numbers. (l)eft, (r)ight, or (d)ecmimal. Default: left");
Output.printColorln(Ansi.Color.WHITE, " -m num Set the number of memory slots. Default value is 10");
Output.printColorln(Ansi.Color.WHITE, " -w num Set Width of header / status line. Default is 70 characters");
Output.printColorln(Ansi.Color.WHITE, " -v Display version information");
Output.printColorln(Ansi.Color.WHITE, " -v Display version information as well as latest GitHub release");
Output.printColorln(Ansi.Color.WHITE, " -z Disable colorized output");

Output.printColorln(Ansi.Color.YELLOW, "\nOperands:");
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/org/fross/rpncalc/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* RPNCalc is is an easy to use console based RPN calculator
*
* Copyright (c) 2013-2020 Michael Fross
* Copyright (c) 2013-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -34,6 +34,7 @@

import org.fross.library.Debug;
import org.fross.library.Format;
import org.fross.library.GitHub;
import org.fross.library.Output;
import org.fusesource.jansi.Ansi;

Expand Down Expand Up @@ -163,9 +164,11 @@ public static void main(String[] args) {
}
break;

case 'v': // Version Display
Output.printColorln(Ansi.Color.YELLOW, "Version: v" + VERSION);
case 'v': // Display current program version and latest GitHub release
Output.printColorln(Ansi.Color.WHITE, "RPNCalc Version: v" + VERSION);
Output.printColorln(Ansi.Color.CYAN, COPYRIGHT);
Output.printColorln(Ansi.Color.WHITE, "\nLatest Release on GitHub: " + GitHub.updateCheck("rpncalc"));
Output.printColorln(Ansi.Color.CYAN, "HomePage: https://github.com/frossm/rpncalc");
System.exit(0);
break;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fross/rpncalc/Math.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* RPNCalc is is an easy to use console based RPN calculator
*
* Copyright (c) 2013-2020 Michael Fross
* Copyright (c) 2013-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fross/rpncalc/Prefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* RPNCalc is is an easy to use console based RPN calculator
*
* Copyright (c) 2013-2020 Michael Fross
* Copyright (c) 2013-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fross/rpncalc/StackOps.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* RPNCalc is is an easy to use console based RPN calculator
*
* Copyright (c) 2013-2020 Michael Fross
* Copyright (c) 2013-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 5b76957

Please sign in to comment.