Skip to content

Commit 1862692

Browse files
committed
[wip] how do you make the logger output to stdout?
I would just upload the file but there is no idea.log generated either.
1 parent 8c676c6 commit 1862692

File tree

2 files changed

+7
-121
lines changed

2 files changed

+7
-121
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- main
1010
- eap
11+
- test
1112
pull_request:
1213

1314
jobs:
@@ -41,124 +42,3 @@ jobs:
4142
with:
4243
name: tests-result
4344
path: ${{ github.workspace }}/build/reports/tests
44-
45-
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum. Run
46-
# verifyPlugin and IntelliJ Plugin Verifier. Build plugin and provide the
47-
# artifact for the next workflow jobs.
48-
build:
49-
name: Build
50-
needs: test
51-
runs-on: ubuntu-latest
52-
outputs:
53-
version: ${{ steps.properties.outputs.version }}
54-
changelog: ${{ steps.properties.outputs.changelog }}
55-
steps:
56-
# Check out current repository
57-
- name: Fetch Sources
58-
uses: actions/checkout@v4.1.1
59-
60-
# Setup Java 11 environment for the next steps
61-
- name: Setup Java
62-
uses: actions/setup-java@v4
63-
with:
64-
distribution: zulu
65-
java-version: 17
66-
cache: gradle
67-
68-
# Set environment variables
69-
- name: Export Properties
70-
id: properties
71-
shell: bash
72-
run: |
73-
PROPERTIES="$(./gradlew properties --console=plain -q)"
74-
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
75-
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
76-
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
77-
CHANGELOG="${CHANGELOG//'%'/'%25'}"
78-
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
79-
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
80-
echo "::set-output name=version::$VERSION"
81-
echo "::set-output name=name::$NAME"
82-
echo "::set-output name=changelog::$CHANGELOG"
83-
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
84-
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
85-
86-
# Run plugin build
87-
- name: Run Build
88-
run: ./gradlew clean buildPlugin --info
89-
90-
# until https://github.com/JetBrains/gradle-intellij-plugin/issues/1027 is solved
91-
92-
# # Cache Plugin Verifier IDEs
93-
# - name: Setup Plugin Verifier IDEs Cache
94-
# uses: actions/cache@v2.1.7
95-
# with:
96-
# path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
97-
# key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
98-
#
99-
# # Run Verify Plugin task and IntelliJ Plugin Verifier tool
100-
# - name: Run Plugin Verification tasks
101-
# run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
102-
#
103-
# # Collect Plugin Verifier Result
104-
# - name: Collect Plugin Verifier Result
105-
# if: ${{ always() }}
106-
# uses: actions/upload-artifact@v4
107-
# with:
108-
# name: pluginVerifier-result
109-
# path: ${{ github.workspace }}/build/reports/pluginVerifier
110-
111-
# Run Qodana inspections
112-
- name: Qodana - Code Inspection
113-
uses: JetBrains/qodana-action@v2023.3.0
114-
115-
# Prepare plugin archive content for creating artifact
116-
- name: Prepare Plugin Artifact
117-
id: artifact
118-
shell: bash
119-
run: |
120-
cd ${{ github.workspace }}/build/distributions
121-
FILENAME=`ls *.zip`
122-
unzip "$FILENAME" -d content
123-
echo "::set-output name=filename::${FILENAME:0:-4}"
124-
# Store already-built plugin as an artifact for downloading
125-
- name: Upload artifact
126-
uses: actions/upload-artifact@v4
127-
with:
128-
name: ${{ steps.artifact.outputs.filename }}
129-
path: ./build/distributions/content/*/*
130-
131-
# Prepare a draft release for GitHub Releases page for the manual verification
132-
# If accepted and published, release workflow would be triggered
133-
releaseDraft:
134-
name: Release Draft
135-
if: github.event_name != 'pull_request'
136-
needs: build
137-
runs-on: ubuntu-latest
138-
steps:
139-
140-
# Check out current repository
141-
- name: Fetch Sources
142-
uses: actions/checkout@v4.1.1
143-
144-
# Remove old release drafts by using the curl request for the available releases with draft flag
145-
- name: Remove Old Release Drafts
146-
env:
147-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148-
run: |
149-
gh api repos/{owner}/{repo}/releases \
150-
--jq '.[] | select(.draft == true) | .id' \
151-
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}
152-
# Create new release draft - which is not publicly visible and requires manual acceptance
153-
- name: Create Release Draft
154-
env:
155-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156-
run: |
157-
gh release create v${{ needs.build.outputs.version }} \
158-
--draft \
159-
--target ${GITHUB_REF_NAME} \
160-
--title "v${{ needs.build.outputs.version }}" \
161-
--notes "$(cat << 'EOM'
162-
${{ needs.build.outputs.changelog }}
163-
EOM
164-
)"

src/main/kotlin/com/coder/gateway/sdk/CoderCLIManager.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class CoderCLIManager @JvmOverloads constructor(
5151
)
5252
if (!remoteBinaryURLOverride.isNullOrBlank()) {
5353
logger.info("Using remote binary override $remoteBinaryURLOverride")
54+
println("Using remote binary override $remoteBinaryURLOverride")
5455
remoteBinaryURL = try {
5556
remoteBinaryURLOverride.toURL()
5657
} catch (e: Exception) {
@@ -69,6 +70,7 @@ class CoderCLIManager @JvmOverloads constructor(
6970
*/
7071
private fun getCoderCLIForOS(os: OS?, arch: Arch?): String {
7172
logger.info("Resolving binary for $os $arch")
73+
println("Resolving binary for $os $arch")
7274
if (os == null) {
7375
logger.error("Could not resolve client OS and architecture, defaulting to WINDOWS AMD64")
7476
return "coder-windows-amd64.exe"
@@ -109,6 +111,7 @@ class CoderCLIManager @JvmOverloads constructor(
109111
}
110112
if (etag != null) {
111113
logger.info("Found existing binary at $localBinaryPath; calculated hash as $etag")
114+
println("Found existing binary at $localBinaryPath; calculated hash as $etag")
112115
conn.setRequestProperty("If-None-Match", "\"$etag\"")
113116
}
114117
conn.setRequestProperty("Accept-Encoding", "gzip")
@@ -120,9 +123,11 @@ class CoderCLIManager @JvmOverloads constructor(
120123
try {
121124
conn.connect()
122125
logger.info("GET ${conn.responseCode} $remoteBinaryURL")
126+
println("GET ${conn.responseCode} $remoteBinaryURL")
123127
when (conn.responseCode) {
124128
HttpURLConnection.HTTP_OK -> {
125129
logger.info("Downloading binary to $localBinaryPath")
130+
println("Downloading binary to $localBinaryPath")
126131
Files.createDirectories(localBinaryPath.parent)
127132
conn.inputStream.use {
128133
Files.copy(
@@ -139,6 +144,7 @@ class CoderCLIManager @JvmOverloads constructor(
139144

140145
HttpURLConnection.HTTP_NOT_MODIFIED -> {
141146
logger.info("Using cached binary at $localBinaryPath")
147+
println("Using cached binary at $localBinaryPath")
142148
return false
143149
}
144150
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy