mirror of
https://github.com/rife2/bld
synced 2026-08-05 15:17:49 +02:00
Compare commits
2 commits
54b2b4d305
...
d602ebe2a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d602ebe2a8 | ||
|
|
ec2cadb2a7 |
66
.github/workflows/bld.yml
vendored
66
.github/workflows/bld.yml
vendored
|
|
@ -112,11 +112,27 @@ jobs:
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: lib
|
path: lib
|
||||||
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
key: ${{ runner.os }}-bld-${{ hashFiles('lib/bld/bld-wrapper.properties') }}
|
||||||
restore-keys: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
restore-keys: |
|
||||||
|
${{ runner.os }}-bld-
|
||||||
|
|
||||||
|
- name: Check for bld cache
|
||||||
|
id: check-cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ -f "lib/bld/bld.cache" ]; then
|
||||||
|
echo "cache_exists=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: ./bld clean download
|
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||||
|
run: ./bld clean download purge
|
||||||
|
|
||||||
|
- name: Update dependencies
|
||||||
|
if: steps.check-cache.outputs.cache_exists == 'true'
|
||||||
|
run: ./bld clean updates
|
||||||
|
|
||||||
- name: Compile source
|
- name: Compile source
|
||||||
run: ./bld compile
|
run: ./bld compile
|
||||||
|
|
@ -161,11 +177,27 @@ jobs:
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: lib
|
path: lib
|
||||||
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
key: ${{ runner.os }}-bld-${{ hashFiles('lib/bld/bld-wrapper.properties') }}
|
||||||
restore-keys: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
restore-keys: |
|
||||||
|
${{ runner.os }}-bld-
|
||||||
|
|
||||||
|
- name: Check for bld cache
|
||||||
|
id: check-cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ -f "lib/bld/bld.cache" ]; then
|
||||||
|
echo "cache_exists=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: ./bld clean download
|
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||||
|
run: ./bld clean download purge
|
||||||
|
|
||||||
|
- name: Update dependencies
|
||||||
|
if: steps.check-cache.outputs.cache_exists == 'true'
|
||||||
|
run: ./bld clean updates
|
||||||
|
|
||||||
- name: Compile source
|
- name: Compile source
|
||||||
run: ./bld compile
|
run: ./bld compile
|
||||||
|
|
@ -208,11 +240,27 @@ jobs:
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: lib
|
path: lib
|
||||||
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
key: ${{ runner.os }}-bld-${{ hashFiles('lib/bld/bld-wrapper.properties') }}
|
||||||
restore-keys: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
restore-keys: |
|
||||||
|
${{ runner.os }}-bld-
|
||||||
|
|
||||||
|
- name: Check for bld cache
|
||||||
|
id: check-cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ -f "lib/bld/bld.cache" ]; then
|
||||||
|
echo "cache_exists=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: .\bld.bat clean download
|
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||||
|
run: .\bld.bat download purge
|
||||||
|
|
||||||
|
- name: Update dependencies
|
||||||
|
if: steps.check-cache.outputs.cache_exists == 'true'
|
||||||
|
run: .\bld.bat updates
|
||||||
|
|
||||||
- name: Compile source
|
- name: Compile source
|
||||||
run: .\bld.bat compile
|
run: .\bld.bat compile
|
||||||
|
|
|
||||||
1
.github/workflows/pages.yml
vendored
1
.github/workflows/pages.yml
vendored
|
|
@ -22,7 +22,6 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
# Single deploy job since we're just deploying
|
# Single deploy job since we're just deploying
|
||||||
deploy:
|
deploy:
|
||||||
if: github.repository == 'rife2/bld'
|
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
|
|
||||||
49
.github/workflows/publish.yml
vendored
49
.github/workflows/publish.yml
vendored
|
|
@ -1,49 +0,0 @@
|
||||||
name: publish-snapshots
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-bld-project:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout source repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Check version is SNAPSHOT
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
VERSION=$(tr -d '[:space:]' < src/main/resources/BLD_VERSION)
|
|
||||||
echo "Current version: $VERSION"
|
|
||||||
if ! echo "$VERSION" | grep -q 'SNAPSHOT$'; then
|
|
||||||
echo "::error:: Version '$VERSION' is not a SNAPSHOT. Aborting publish."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up JDK
|
|
||||||
uses: actions/setup-java@v5
|
|
||||||
with:
|
|
||||||
distribution: "temurin"
|
|
||||||
java-version: 17
|
|
||||||
|
|
||||||
- name: Download dependencies
|
|
||||||
run: ./bld download
|
|
||||||
|
|
||||||
- name: Import key
|
|
||||||
run: echo "${{ secrets.SIGN_SECRET_KEY }}" | gpg --batch --import
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: >-
|
|
||||||
./bld compile test publish
|
|
||||||
-Drife2Username=${{ secrets.RIFE2_USERNAME }}
|
|
||||||
-Drife2Password=${{ secrets.RIFE2_PASSWORD }}
|
|
||||||
-DsonatypeUser=${{ secrets.SONATYPE_USER }}
|
|
||||||
-DsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
|
|
||||||
-DsignKey=${{ secrets.SIGN_KEY }}
|
|
||||||
-DsignPassphrase=${{ secrets.SIGN_PASSPHRASE }}
|
|
||||||
|
|
||||||
- name: Delete GnuPG data
|
|
||||||
run: rm -rfv $HOME/.gnupg
|
|
||||||
|
|
@ -9,4 +9,4 @@ bld.javaOptions=
|
||||||
bld.javacOptions=
|
bld.javacOptions=
|
||||||
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,RIFE2_SNAPSHOTS
|
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,RIFE2_SNAPSHOTS
|
||||||
bld.sourceDirectories=core/src/bld/java
|
bld.sourceDirectories=core/src/bld/java
|
||||||
bld.version=2.3.1-SNAPSHOT
|
bld.version=2.3.0
|
||||||
|
|
@ -534,23 +534,8 @@ public class BaseProject extends BuildExecutor {
|
||||||
@BuildCommand(help = DownloadHelp.class)
|
@BuildCommand(help = DownloadHelp.class)
|
||||||
public void download()
|
public void download()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
var auto = false;
|
|
||||||
var arguments = this.arguments();
|
|
||||||
while (!arguments.isEmpty()) {
|
|
||||||
var argument = arguments.get(0);
|
|
||||||
if (DownloadOperation.AUTO_OPTION.equals(argument)) {
|
|
||||||
arguments.remove(0);
|
|
||||||
auto = true;
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (auto) {
|
|
||||||
performAutoDownloadPurge();
|
|
||||||
} else {
|
|
||||||
downloadOperation().executeOnce(() -> downloadOperation().fromProject(this));
|
downloadOperation().executeOnce(() -> downloadOperation().fromProject(this));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standard build command, purges all unused artifacts from the project.
|
* Standard build command, purges all unused artifacts from the project.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
package rife.bld.help;
|
package rife.bld.help;
|
||||||
|
|
||||||
import rife.bld.CommandHelp;
|
import rife.bld.CommandHelp;
|
||||||
import rife.bld.operations.DownloadOperation;
|
import rife.tools.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides help for the download command.
|
* Provides help for the download command.
|
||||||
|
|
@ -15,13 +15,13 @@ import rife.bld.operations.DownloadOperation;
|
||||||
*/
|
*/
|
||||||
public class DownloadHelp implements CommandHelp {
|
public class DownloadHelp implements CommandHelp {
|
||||||
public String getSummary() {
|
public String getSummary() {
|
||||||
return "Downloads all dependencies of the project (take option)";
|
return "Downloads all dependencies of the project";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription(String topic) {
|
public String getDescription(String topic) {
|
||||||
return String.format("""
|
return StringUtils.replace("""
|
||||||
Downloads all dependencies of the project
|
Downloads all dependencies of the project
|
||||||
|
|
||||||
Usage : %s [%s]""", topic, DownloadOperation.AUTO_OPTION);
|
Usage : ${topic}""", "${topic}", topic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -25,7 +25,6 @@ import static rife.bld.dependencies.Dependency.CLASSIFIER_SOURCES;
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
public class DownloadOperation extends AbstractOperation<DownloadOperation> {
|
public class DownloadOperation extends AbstractOperation<DownloadOperation> {
|
||||||
public static final String AUTO_OPTION = "--auto";
|
|
||||||
private boolean offline_ = false;
|
private boolean offline_ = false;
|
||||||
private HierarchicalProperties properties_ = null;
|
private HierarchicalProperties properties_ = null;
|
||||||
private ArtifactRetriever retriever_ = null;
|
private ArtifactRetriever retriever_ = null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue