generated from mingliqiye/lib-tem
Compare commits
7 Commits
Auto-Relea
...
master
Author | SHA1 | Date | |
---|---|---|---|
c08d5813c0 | |||
b3fe493804 | |||
131bf0efe2 | |||
81a031b69f | |||
f645ffacdf | |||
2a15ab653f | |||
133fd1a77d |
@ -22,6 +22,5 @@ jobs:
|
|||||||
source gradle.properties
|
source gradle.properties
|
||||||
SHA=${{gitea.sha}}
|
SHA=${{gitea.sha}}
|
||||||
curl -o- https://git.mingliqiye.com/Actions/com.mingliqiye.gitea.releases/raw/branch/master/install.sh | bash
|
curl -o- https://git.mingliqiye.com/Actions/com.mingliqiye.gitea.releases/raw/branch/master/install.sh | bash
|
||||||
FILENAME="${GROUPSID}-${VERSIONS}.jar"
|
FILENAME="${GROUPSID}-${VERSIONS}.jar" java -jar com.mingliqiye.gitea.releases.jar -s "${{gitea.server_url}}" -o "${{gitea.repository_owner}}" -r ${{gitea.event .repository.name}} -t "${{gitea.token}}" -ti "Auto releases ${{gitea.sha}} ${VERSIONS}" -b "# Auto releases wtih ${{gitea.event .head_commit.message}} - [${{gitea.sha}}](${{gitea.event .head_commit.url}})" -tn "Auto-Releases-${VERSIONS}-${SHA:0:10}" -a "build/libs" -a "build/publications/mavenJava"
|
||||||
java -jar com.mingliqiye.gitea.releases.jar -s "${{gitea.server_url}}" -o "${{gitea.repository_owner}}" -r ${{gitea.event.repository.name}} -t "${{gitea.token}}" -ti "Auto releases ${{gitea.sha}} ${VERSIONS}" -b "# Auto releases wtih ${{gitea.event.head_commit.message}} - [${{gitea.sha}}](${{gitea.event.head_commit.url}})" -tn "Auto-Releases-${VERSIONS}-${SHA:0:10}" -a "build/libs"
|
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import java.security.MessageDigest
|
import java.security.MessageDigest
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
@ -36,7 +35,7 @@ dependencies {
|
|||||||
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||||
implementation("com.mingliqiye:string-utilts:1.0.4")
|
implementation("com.mingliqiye:string-utils:1.0.4")
|
||||||
implementation("org.jetbrains:annotations:24.0.0")
|
implementation("org.jetbrains:annotations:24.0.0")
|
||||||
annotationProcessor("org.jetbrains:annotations:24.0.0")
|
annotationProcessor("org.jetbrains:annotations:24.0.0")
|
||||||
}
|
}
|
||||||
|
27
build.yaml
27
build.yaml
@ -1,27 +0,0 @@
|
|||||||
name: Gitea Actions Build
|
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
jobs:
|
|
||||||
Build:
|
|
||||||
runs-on: ubuntu-dev
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: https://git.mingliqiye.com/Actions/checkout@v4
|
|
||||||
|
|
||||||
- name: build-test
|
|
||||||
run: |
|
|
||||||
source gradle.properties
|
|
||||||
gradle
|
|
||||||
gradle build-jar
|
|
||||||
|
|
||||||
- name: Releases
|
|
||||||
run: |
|
|
||||||
source gradle.properties
|
|
||||||
SHA=${{gitea.sha}}
|
|
||||||
curl -o- https://git.mingliqiye.com/Actions/com.mingliqiye.gitea.releases/raw/branch/master/install.sh | bash
|
|
||||||
FILENAME="${GROUPSID}-${VERSIONS}.jar"
|
|
||||||
java -jar com.mingliqiye.gitea.releases.jar -s "${{gitea.server_url}}" -o "${{gitea.repository_owner}}" -r ${{gitea.event.repository.name}} -t "${{gitea.token}}" -ti "Auto releases ${{gitea.sha}} ${VERSIONS}" -b "# Auto releases wtih ${{gitea.event.head_commit.message}} - [${{gitea.sha}}](${{gitea.event.head_commit.url}})" -tn "Auto-Releases-${VERSIONS}-${SHA:0:10}" -a "build/libs"
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
GROUPSID=com.mingliqiye
|
GROUPSID=com.mingliqiye
|
||||||
ARTIFACTID=network-endpoint
|
ARTIFACTID=network-endpoint
|
||||||
VERSIONS=1.0.2
|
VERSIONS=1.0.4
|
||||||
MAINCLASS=com.mingliqiye
|
MAINCLASS=com.mingliqiye
|
||||||
JDKVERSIONS=1.8
|
JDKVERSIONS=1.8
|
||||||
|
@ -56,12 +56,14 @@ public class NetworkAddress implements Serializable {
|
|||||||
public static NetworkAddress of(String domip) {
|
public static NetworkAddress of(String domip) {
|
||||||
return new NetworkAddress(domip);
|
return new NetworkAddress(domip);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NetworkAddress of(InetAddress inetAddress) {
|
public static NetworkAddress of(InetAddress inetAddress) {
|
||||||
return new NetworkAddress(inetAddress.getHostAddress());
|
return new NetworkAddress(inetAddress.getHostAddress());
|
||||||
}
|
}
|
||||||
public InetAddress toInetAddress(){
|
|
||||||
|
public InetAddress toInetAddress() {
|
||||||
try {
|
try {
|
||||||
return InetAddress.getByName(domain);
|
return InetAddress.getByName(ip != null ? ip : domain);
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
@ -74,7 +76,8 @@ public class NetworkAddress implements Serializable {
|
|||||||
* @return IP地址
|
* @return IP地址
|
||||||
* @throws UnknownHostException 没找到对应的IP
|
* @throws UnknownHostException 没找到对应的IP
|
||||||
*/
|
*/
|
||||||
public static String getHostIp(@NotNull String domain) throws UnknownHostException {
|
public static String getHostIp(@NotNull String domain)
|
||||||
|
throws UnknownHostException {
|
||||||
InetAddress[] addresses = InetAddress.getAllByName(domain.trim());
|
InetAddress[] addresses = InetAddress.getAllByName(domain.trim());
|
||||||
return addresses[0].getHostAddress();
|
return addresses[0].getHostAddress();
|
||||||
}
|
}
|
||||||
@ -110,9 +113,10 @@ public class NetworkAddress implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return isdom?StringUtil.format("NetworkAddress(IP='{}',type='{}'," +
|
return isdom ? StringUtil.format(
|
||||||
"domain='{}')",ip,IPv,domain):
|
"NetworkAddress(IP='{}',type='{}'," + "domain='{}')", ip, IPv,
|
||||||
StringUtil.format("NetworkAddress(IP='{}',type='{}')",ip,IPv);
|
domain) :
|
||||||
|
StringUtil.format("NetworkAddress(IP='{}',type='{}')", ip, IPv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
name: Gitea Actions Build
|
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
jobs:
|
|
||||||
Build:
|
|
||||||
runs-on: ubuntu-dev
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: https://git.mingliqiye.com/Actions/checkout@v4
|
|
||||||
|
|
||||||
- name: build-test
|
|
||||||
run: |
|
|
||||||
source gradle.properties
|
|
||||||
gradle
|
|
||||||
gradle build-jar
|
|
||||||
|
|
||||||
- name: Releases
|
|
||||||
run: |
|
|
||||||
source gradle.properties
|
|
||||||
SHA=${{gitea.sha}}
|
|
||||||
curl -o- https://git.mingliqiye.com/Actions/com.mingliqiye.gitea.releases/raw/branch/master/install.sh | bash
|
|
||||||
FILENAME="${GROUPSID}-${VERSIONS}.jar"
|
|
||||||
java -jar com.mingliqiye.gitea.releases.jar -s "${{gitea.server_url}}" -o "${{gitea.repository_owner}}" -r ${{gitea.event.repository.name}} -t "${{gitea.token}}" -ti "Auto releases ${{gitea.sha}} ${VERSIONS}" -b "# Auto releases wtih ${{gitea.event.head_commit.message}} - [${{gitea.sha}}](${{gitea.event.head_commit.url}})" -tn "Auto-Releases-${VERSIONS}-${SHA:0:10}" -a "build/libs"
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user