-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
493 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "site/themes/cayman-hugo-theme"] | ||
path = site/themes/cayman-hugo-theme | ||
url = https://github.com/zwbetz-gh/cayman-hugo-theme.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# building minimal jdk | ||
FROM openjdk:17.0.1-slim AS base | ||
|
||
# create minimal jdk | ||
RUN /usr/local/openjdk-17/bin/jlink \ | ||
--compress=2 \ | ||
--add-modules jdk.zipfs \ | ||
--no-header-files \ | ||
--no-man-pages \ | ||
--output /opt/openjdk-17-minimal | ||
|
||
# building pochi | ||
FROM alpine:3.10.1 | ||
|
||
ARG Version="1.0.0-SNAPSHOT" | ||
|
||
LABEL maintainer="Haruaki Tamada" \ | ||
chclver-version="${PochiVersion}" \ | ||
description="change class files' versions" | ||
|
||
COPY --from=base /opt/openjdk-17-minimal /opt/openjdk-17-minimal | ||
|
||
RUN apk --no-cache --virtual .builddeps add curl unzip \ | ||
&& ln -s /opt/openjdk-17-minimal /opt/java \ | ||
&& echo 'https://www.dropbox.com/s/wmi32z0db7js86k/chclver-1.0.0-SNAPSHOT-distribution.zip?dl=0' \ | ||
&& curl -L 'https://www.dropbox.com/s/wmi32z0db7js86k/chclver-${Version}-distribution.zip?dl=0' -o /tmp/chclver.zip \ | ||
# && curl -L https://github.com/tamada/chclver/releases/download/v${Version}/chclver-${Version}.zip -o /tmp/chclver.zip | ||
&& unzip -q /tmp/chclver.zip -d /opt \ | ||
&& ln -s /opt/chclver-${Version} /opt/chclver \ | ||
&& rm -rf /opt/chclver/{docs,completions} \ | ||
# add user | ||
&& adduser -D chclver \ | ||
# remove installed package | ||
&& rm -f /tmp/chclver.zip \ | ||
&& apk del --purge .builddeps \ | ||
|
||
ENV CHCLVER_HOME="/opt/chclver" | ||
ENV JAVA_HOME="/opt/java" | ||
ENV PATH="$PATH:$JAVA_HOME/bin:$CHCLVER_HOME/bin" | ||
ENV HOME="/home/chclver" | ||
|
||
WORKDIR /home/chclver | ||
USER chclver | ||
|
||
ENTRYPOINT [ "chclver" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
### https://raw.github.com/github/gitignore/ce6f84024931408ce801808fe9f4587f7588b283/community/Golang/Hugo.gitignore | ||
|
||
# Generated files by hugo | ||
/public/ | ||
/resources/_gen/ | ||
|
||
# Executable may be added to repository | ||
hugo.exe | ||
hugo.darwin | ||
hugo.linux | ||
|
||
|
||
### https://raw.github.com/github/gitignore/ce6f84024931408ce801808fe9f4587f7588b283/community/Golang/Hugo.gitignore | ||
|
||
# Generated files by hugo | ||
/public/ | ||
/resources/_gen/ | ||
|
||
# Executable may be added to repository | ||
hugo.exe | ||
hugo.darwin | ||
hugo.linux | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
baseURL = 'https://tamada.github.io/chclver' | ||
languageCode = 'en-us' | ||
title = 'chclver' | ||
enableEmoji = true | ||
paginate = 10 | ||
hasCJKLanguage = false | ||
theme = "cayman-hugo-theme" | ||
|
||
[params] | ||
project_name = "chclver" | ||
project_tagline = "Change class files' versions" | ||
project_logo = "images/logo.svg" | ||
dateFormat = "Jan 02, 2006" | ||
footer = "[![GitHub](https://img.shields.io/badge/GitHub-tamada/chclver-blueviolet.svg?logo=github)](https://github.com/tamada/chclver) Made with [Hugo](https://gohugo.io/). Theme by [Cayman](https://github.com/zwbetz-gh/cayman-hugo-theme). Deployed to [GitHub Pages](https://pages.github.com/)." | ||
katex = true | ||
|
||
[menu] | ||
[[menu.nav]] | ||
name = ":house: Home" | ||
url = "/" | ||
weight = 1 | ||
[[menu.nav]] | ||
name = ":anchor: Usage & Install" | ||
url = "/usage/" | ||
weight = 2 | ||
[[menu.nav]] | ||
name = ":smile: About" | ||
url = "/about/" | ||
weight = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: ":house: chclver" | ||
--- | ||
|
||
[![Build](https://github.com/tamada/chclver/actions/workflows/maven.yml/badge.svg)](https://github.com/tamada/chclver/actions/workflows/maven.yml) [![Coverage Status](https://coveralls.io/repos/github/tamada/chclver/badge.svg?branch=main)](https://coveralls.io/github/tamada/chclver?branch=main) | ||
|
||
[![codebeat badge](https://codebeat.co/badges/50cf2989-ec6b-467c-9f63-1856478f94d4)](https://codebeat.co/projects/github-com-tamada-chclver-main) | ||
|
||
[![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green?logo=apache)](https://github.com/tamada/chclver/blob/main/LICENSE) [![Version 1.0.0-SNAPSHOT](https://img.shields.io/badge/Version-1.0.0--SNAPSHOT-green)](https://github.com/tamada/chclver/releases/tag/v1.0.0) [![GitHub Discussion](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/tamada/chclver/discussions) | ||
|
||
Change class file versions. | ||
|
||
## :speaking_head: Overview | ||
|
||
This tool manipulates the class files' version (`major_version` and `minor_version`). | ||
|
||
The main features are as follows. | ||
|
||
1. Print the version of the given class files. | ||
2. Update the version of the given class files to the specified version. | ||
3. List the class files' version and corresponding JVM version. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: ":smile: About" | ||
--- | ||
|
||
### :speech_balloon: Discussions | ||
|
||
[![GitHub Discussion](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/tamada/chclver/discussions) | ||
|
||
Please post the message. | ||
|
||
### :man_cook: How to Contribute :woman_cook: | ||
|
||
1. Fork it (https://github.com/tamada/chclver) | ||
2. Create your feature branch (`git checkout -b my-new-feature`) | ||
3. Run test suite (`mvn package`) | ||
4. Commit your changes (`git commit -m 'feat: Add some feature'`) | ||
* Should follow [Conventional commits](https://www.conventionalcommits.org/) to the commit messages. | ||
5. Push to the branch (`git push origin my-new-feature`) | ||
6. Create a new pull request | ||
|
||
### :man_office_worker: Developers :woman_office_worker: | ||
|
||
* Haruaki Tamada ([tamada](https://github.com/tamada)) | ||
|
||
### :scroll: License | ||
|
||
[![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green?logo=apache)](https://github.com/tamada/chclver/blob/main/LICENSE) | ||
|
||
> Copyright 2021 Haruaki TAMADA | ||
> | ||
> Licensed under the Apache License, Version 2.0 (the "License"); | ||
> you may not use this file except in compliance with the License. | ||
> You may obtain a copy of the License at | ||
> | ||
> http://www.apache.org/licenses/LICENSE-2.0 | ||
> | ||
> Unless required by applicable law or agreed to in writing, software | ||
> distributed under the License is distributed on an "AS IS" BASIS, | ||
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
> See the License for the specific language governing permissions and | ||
> limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: ":anchor: Usage & Install" | ||
--- | ||
|
||
## :runner: Usage | ||
|
||
```sh | ||
chclver [OPTIONS] <JAR|CLASS_FILE|DIRECTORY...> | ||
OPTIONS | ||
-d, --destination <DEST> specify the destination. Default is chclver directory. | ||
--list-versions list version of class files and corresponding Java version. | ||
--to <JAVA_VERSION> specify the Java version for updating to (e.g., Java7, | ||
Java17). If this option is absent, print the versions | ||
of the given class files. | ||
--force-to <MAJOR.MINOR> specify the versions of the class files directory. | ||
-v, --verbose verbose mode. | ||
-h, --help print this message. | ||
``` | ||
|
||
The JVM class files have major and minor versions to distinguish the target JVM. The format of the class files is defined in [the JVM specification](https://docs.oracle.com/javase/specs/jvms/se17/html/jvms-4.html#jvms-4.1). | ||
|
||
`chclver` prints/updates class files' version by reading JVM class files. | ||
|
||
## :anchor: Install | ||
|
||
### :beer: Homebrew | ||
|
||
Install `chclver` via [Homebrew](https://brew.sh) to run the following commands. | ||
|
||
```sh | ||
brew tap tamada/brew # at the first time only | ||
brew install chclver | ||
``` | ||
|
||
If you want to install native commands, use `chclver-native` instead of `chclver` (not yet). | ||
|
||
### :muscle: Compile yourself | ||
|
||
Get source codes by `git clone` or download from [GitHub](https://github.com/tamada/chclver), then run `mvn` to build `chclver`. | ||
|
||
```sh | ||
git clone https://github.com/tamada/chclver.git | ||
cd chclver | ||
mvn package | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{ define "main" }} | ||
<h1>{{ .Title | emojify }}</h1> | ||
|
||
{{ .Content | emojify }} | ||
|
||
<ul> | ||
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} | ||
{{ range $pages.ByPublishDate.Reverse }} | ||
<li> | ||
{{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }} | ||
{{ .PublishDate.Format $dateFormat }} | ||
<a href="{{ .Permalink }}"> | ||
{{ .Title | emojify }} | ||
</a> | ||
</li> | ||
{{ end }} | ||
</ul> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{ define "main" }} | ||
<h1>{{ .Title | emojify }}</h1> | ||
{{ .Content | emojify }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{ define "main" }} | ||
<h1>{{ .Title | emojify }}</h1> | ||
|
||
{{ .Content | emojify }} | ||
|
||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<link rel="stylesheet" href="{{ "css/chclver.css" | absURL }}"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css"> | ||
|
||
<script src="https://unpkg.com/mermaid@8.4.2/dist/mermaid.min.js"></script> |
Oops, something went wrong.