Skip to content

Commit b02453f

Browse files
authored
Merge branch 'master' into feature/docker-engine
2 parents 320e66c + 642e334 commit b02453f

32 files changed

Lines changed: 307 additions & 337 deletions

install/install.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ getSystemInfo() {
2929
OS=$(echo `uname`|tr '[:upper:]' '[:lower:]')
3030

3131
# Most linux distro needs root permission to copy the file to /usr/local/bin
32-
if [[ "$OS" == "linux" || "$OS" == "darwin" ]] && [ "FLOWCTL_INSTALL_DIR" == "/usr/local/bin" ]; then
32+
if [[ "$OS" == "linux" || "$OS" == "darwin" ]] && [[ "FLOWCTL_INSTALL_DIR" == "/usr/local/bin" ]]; then
3333
USE_SUDO="true"
3434
fi
3535
}
@@ -40,13 +40,13 @@ verifySupported() {
4040
local current_osarch="${OS}-${ARCH}"
4141

4242
for osarch in "${supported[@]}"; do
43-
if [ "$osarch" == "$current_osarch" ]; then
43+
if [[ "$osarch" == "$current_osarch" ]]; then
4444
echo "Your system is ${OS}_${ARCH}"
4545
return
4646
fi
4747
done
4848

49-
if [ "$current_osarch" == "darwin-arm64" ]; then
49+
if [[ "$current_osarch" == "darwin-arm64" ]]; then
5050
if isReleaseAvailable $releaseTag; then
5151
return
5252
else
@@ -64,7 +64,7 @@ verifySupported() {
6464
runAsRoot() {
6565
local CMD="$*"
6666

67-
if [ $EUID -ne 0 -a $USE_SUDO = "true" ]; then
67+
if [[ $EUID -ne 0 -a $USE_SUDO = "true" ]]; then
6868
CMD="sudo $CMD"
6969
fi
7070

@@ -86,7 +86,7 @@ checkHttpRequestFlowCtl() {
8686
}
8787

8888
checkExistingFlowCtl() {
89-
if [ -f "$FLOWCTL_FILE" ]; then
89+
if [[ -f "$FLOWCTL_FILE" ]]; then
9090
echo -e "\nFlowCtl is detected:"
9191
$FLOWCTL_FILE version
9292
echo -e "Reinstalling FlowCtl - ${FLOWCTL_FILE}...\n"
@@ -99,7 +99,7 @@ getLatestRelease() {
9999
local flowctlReleaseUrl="https://api.github.com/repos/${GITHUB_ORG}/${GITHUB_REPO}/releases"
100100
local latest_release=""
101101

102-
if [ "$HTTP_REQUEST_FLOWCTL" == "curl" ]; then
102+
if [[ "$HTTP_REQUEST_FLOWCTL" == "curl" ]]; then
103103
latest_release=$(curl -s $flowctlReleaseUrl | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
104104
else
105105
latest_release=$(wget -q --header="Accept: application/json" -O - $flowctlReleaseUrl | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
@@ -120,13 +120,13 @@ downloadFile() {
120120
ARTIFACT_TMP_FILE="$FLOWCTL_TMP_ROOT/$FLOWCTL_ARTIFACT"
121121

122122
echo "Downloading $DOWNLOAD_URL ..."
123-
if [ "$HTTP_REQUEST_FLOWCTL" == "curl" ]; then
123+
if [[ "$HTTP_REQUEST_FLOWCTL" == "curl" ]]; then
124124
curl -SsL "$DOWNLOAD_URL" -o "$ARTIFACT_TMP_FILE"
125125
else
126126
wget -q -O "$ARTIFACT_TMP_FILE" "$DOWNLOAD_URL"
127127
fi
128128

129-
if [ ! -f "$ARTIFACT_TMP_FILE" ]; then
129+
if [[ ! -f "$ARTIFACT_TMP_FILE" ]]; then
130130
echo "failed to download $DOWNLOAD_URL ..."
131131
exit 1
132132
fi
@@ -139,15 +139,15 @@ isReleaseAvailable() {
139139
DOWNLOAD_BASE="https://github.com/${GITHUB_ORG}/${GITHUB_REPO}/releases/download"
140140
DOWNLOAD_URL="${DOWNLOAD_BASE}/${LATEST_RELEASE_TAG}/${FLOWCTL_ARTIFACT}"
141141

142-
if [ "$HTTP_REQUEST_FLOWCTL" == "curl" ]; then
142+
if [[ "$HTTP_REQUEST_FLOWCTL" == "curl" ]]; then
143143
httpstatus=$(curl -sSLI -o /dev/null -w "%{http_code}" "$DOWNLOAD_URL")
144-
if [ "$httpstatus" == "200" ]; then
144+
if [[ "$httpstatus" == "200" ]]; then
145145
return 0
146146
fi
147147
else
148148
wget -q --spider "$DOWNLOAD_URL"
149149
exitstatus=$?
150-
if [ $exitstatus -eq 0 ]; then
150+
if [[ $exitstatus -eq 0 ]]; then
151151
return 0
152152
fi
153153
fi
@@ -158,19 +158,19 @@ installFile() {
158158
tar xf "$ARTIFACT_TMP_FILE" -C "$FLOWCTL_TMP_ROOT"
159159
local tmp_root_flowctl="$FLOWCTL_TMP_ROOT/$FLOWCTL_FILENAME"
160160

161-
if [ ! -f "$tmp_root_flowctl" ]; then
161+
if [[ ! -f "$tmp_root_flowctl" ]]; then
162162
echo "Failed to unpack FlowCtl executable."
163163
exit 1
164164
fi
165165

166-
if [ -f "$FLOWCTL_FILE" ]; then
166+
if [[ -f "$FLOWCTL_FILE" ]]; then
167167
runAsRoot rm "$FLOWCTL_FILE"
168168
fi
169169
chmod o+x $tmp_root_flowctl
170170
mkdir -p $FLOWCTL_INSTALL_DIR
171171
runAsRoot cp "$tmp_root_flowctl" "$FLOWCTL_INSTALL_DIR"
172172

173-
if [ -f "$FLOWCTL_FILE" ]; then
173+
if [[ -f "$FLOWCTL_FILE" ]]; then
174174
echo "$FLOWCTL_FILENAME installed into $FLOWCTL_INSTALL_DIR successfully."
175175

176176
$FLOWCTL_FILE version
@@ -182,7 +182,7 @@ installFile() {
182182

183183
fail_trap() {
184184
result=$?
185-
if [ "$result" != "0" ]; then
185+
if [[ "$result" != "0" ]]; then
186186
echo "Failed to install FlowCtl"
187187
echo "For support, go to https://flowsynx.io"
188188
fi
@@ -208,7 +208,7 @@ trap "fail_trap" EXIT
208208
getSystemInfo
209209
checkHttpRequestFlowCtl
210210

211-
if [ -z "$1" ]; then
211+
if [[ -z "$1" ]]; then
212212
echo "Getting the latest FlowCtl..."
213213
getLatestRelease
214214
else

src/FlowCtl.Core/Services/Authentication/AuthenticationType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
public enum AuthenticationType
44
{
5+
None = 0,
56
Basic,
67
Bearer
78
}

src/FlowCtl.Core/Services/Authentication/IAuthenticationManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ public interface IAuthenticationManager
44
{
55
bool IsLoggedIn { get; }
66
bool IsBasicAuthenticationUsed { get; }
7+
AuthenticationData LoginNone();
78
AuthenticationData LoginBasic(string username, string password);
89
AuthenticationData LoginBearer(string token);
910
AuthenticationData? GetData();

src/FlowCtl.Infrastructure/Extensions/LoggerExtensions.cs

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/FlowCtl.Infrastructure/FlowCtl.Infrastructure.csproj

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@
1111
<DebugType>None</DebugType>
1212
</PropertyGroup>
1313

14-
<ItemGroup>
15-
<Compile Remove="Logging\**" />
16-
<EmbeddedResource Remove="Logging\**" />
17-
<None Remove="Logging\**" />
18-
</ItemGroup>
19-
20-
<ItemGroup>
21-
<Compile Remove="Extensions\LoggerExtensions.cs" />
22-
</ItemGroup>
23-
2414
<ItemGroup>
2515
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="9.0.4" />
2616
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="9.0.4" />

src/FlowCtl.Infrastructure/Logging/ConsoleLogger/ConsoleLogger.cs

Lines changed: 0 additions & 103 deletions
This file was deleted.

src/FlowCtl.Infrastructure/Logging/ConsoleLogger/ConsoleLoggerOptions.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/FlowCtl.Infrastructure/Logging/ConsoleLogger/ConsoleLoggerProvider.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/FlowCtl.Infrastructure/Logging/LogMessage.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/FlowCtl.Infrastructure/Logging/LogQueue.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)