Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 29 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
# Necessary for most environments as build failure can occur due to OOM issues
NODE_OPTIONS: "--max-old-space-size=4096"
ARTIFACT_NAME_PREFIX: "scanoss-cc"
APP_NAME: "SCANOSS Code Compare"
GOLANG_VERSION: "1.23"
NODE_VERSION: "20.x"

Expand Down Expand Up @@ -46,10 +47,15 @@ jobs:
shell: bash

# Build
- name: Set APP_VERSION
run: |
APP_VERSION=$(git tag --sort=-version:refname | head -n 1)
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV

- name: Build App
run: |
make cp_assets
wails build -ldflags "-X github.com/scanoss/scanoss.cc/backend/entities.AppVersion=$(git tag --sort=-version:refname | head -n 1)" --platform "darwin/universal" -o "${{ env.ARTIFACT_NAME_PREFIX }}"
wails build -ldflags "-X github.com/scanoss/scanoss.cc/backend/entities.AppVersion=${{ env.APP_VERSION }}" --platform "darwin/universal" -o "${{ env.ARTIFACT_NAME_PREFIX }}"
shell: bash

# Make sure the .app exists
Expand Down Expand Up @@ -96,8 +102,14 @@ jobs:
mkdir -p dist dmg_contents
cp -R "build/bin/${{ env.ARTIFACT_NAME_PREFIX }}.app" dmg_contents/
create-dmg \
--volname "${{ env.ARTIFACT_NAME_PREFIX }} Installer" \
"dist/${{ env.ARTIFACT_NAME_PREFIX }}-$(git tag --sort=-version:refname | head -n 1).dmg" \
--volname "${{ env.APP_NAME }} Installer" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "${{ env.ARTIFACT_NAME_PREFIX }}.app" 200 190 \
--hide-extension "${{ env.ARTIFACT_NAME_PREFIX }}.app" \
--app-drop-link 600 185 \
"dist/${{ env.ARTIFACT_NAME_PREFIX }}-${{ env.APP_VERSION }}.dmg" \
dmg_contents/
rm -rf dmg_contents

Expand All @@ -108,7 +120,7 @@ jobs:
APP_CERTIFICATE: ${{ secrets.MACOS_DEVELOPER_CERT_FULL_ID }}
APPLE_DEVELOPER_ID: ${{ secrets.MACOS_DEVELOPER_CERT_ID }}
run: |
DMG_PATH="dist/${{ env.ARTIFACT_NAME_PREFIX }}-$(git tag --sort=-version:refname | head -n 1).dmg"
DMG_PATH="dist/${{ env.ARTIFACT_NAME_PREFIX }}-${{ env.APP_VERSION }}.dmg"

echo "Signing .dmg with Certificate"
codesign --timestamp --deep --options runtime -s "$APP_CERTIFICATE" --force --verbose "$DMG_PATH"
Expand Down Expand Up @@ -149,7 +161,7 @@ jobs:

- name: Update Cask Formula
run: |
APP_VERSION=$(git tag --sort=-version:refname | head -n 1)
APP_VERSION=${{ env.APP_VERSION }}
APP_VERSION=${APP_VERSION#v} # Remove 'v' prefix if present

sed -i '' \
Expand Down Expand Up @@ -207,10 +219,15 @@ jobs:
shell: bash

# Build
- name: Set APP_VERSION
run: |
APP_VERSION=$(git tag --sort=-version:refname | head -n 1)
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV

- name: Build App
run: |
make cp_assets
wails build -ldflags "-X github.com/scanoss/scanoss.cc/backend/entities.AppVersion=$(git tag --sort=-version:refname | head -n 1)" --platform linux/amd64 -o "${{ env.ARTIFACT_NAME_PREFIX }}-linux"
wails build -ldflags "-X github.com/scanoss/scanoss.cc/backend/entities.AppVersion=${{ env.APP_VERSION }}" --platform linux/amd64 -o "${{ env.ARTIFACT_NAME_PREFIX }}-linux"
shell: bash

- name: Make binary executable
Expand Down Expand Up @@ -260,10 +277,15 @@ jobs:
shell: bash

# Build
- name: Set APP_VERSION
run: |
APP_VERSION=$(git tag --sort=-version:refname | head -n 1)
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV

- name: Build App
run: |
make cp_assets
wails build -ldflags "-X github.com/scanoss/scanoss.cc/backend/entities.AppVersion=$(git tag --sort=-version:refname | head -n 1)" --platform "windows/amd64" -webview2 download -o "${{ env.ARTIFACT_NAME_PREFIX }}.exe" -windowsconsole
wails build -ldflags "-X github.com/scanoss/scanoss.cc/backend/entities.AppVersion=${{ env.APP_VERSION }}" --platform "windows/amd64" -webview2 download -o "${{ env.ARTIFACT_NAME_PREFIX }}.exe" -windowsconsole
shell: bash

- uses: actions/upload-artifact@v4
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.9.1] 2025-11-04
### Fixed
- Fix installation scripts
- Fix .dmg installer

## [0.9.0] 2025-11-03
### Added
- Comprehensive installation guide (INSTALLATION.md) covering all platforms and distribution methods
Expand Down Expand Up @@ -161,3 +166,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[0.8.0]: https://github.com/scanoss/scanoss.cc/compare/v0.7.6...v0.8.0
[0.8.1]: https://github.com/scanoss/scanoss.cc/compare/v0.8.0...v0.8.1
[0.9.0]: https://github.com/scanoss/scanoss.cc/compare/v0.8.1...v0.9.0
[0.9.1]: https://github.com/scanoss/scanoss.cc/compare/v0.9.0...v0.9.1
6 changes: 6 additions & 0 deletions scripts/install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ install_linux() {
abort "This installer is for Linux only. Please use the appropriate installer for your platform."
fi

# Detect non-interactive mode
if [ ! -t 0 ]; then
log_info "Running in non-interactive mode (using default options)"
echo >&2
fi

# Check if we need sudo
local need_sudo=false
if [ ! -w "$INSTALL_DIR" ]; then
Expand Down
4 changes: 3 additions & 1 deletion scripts/install-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ main() {

# If running non-interactively or with --homebrew flag, skip menu
if [ ! -t 0 ] || [ "$1" == "--homebrew" ]; then
log_info "Running in non-interactive mode (installing via Homebrew)"
echo >&2
install_via_homebrew
show_completion
return 0
Expand All @@ -254,7 +256,7 @@ main() {
# Get user choice
local choice
while true; do
read -p "Enter your choice (1-3): " choice
read -p "Enter your choice (1-3): " choice </dev/tty
case $choice in
1)
if install_via_homebrew; then
Expand Down
Empty file modified scripts/install-windows.ps1
100644 → 100755
Empty file.
26 changes: 20 additions & 6 deletions scripts/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,29 @@ cleanup_temp_dir() {
confirm() {
local prompt="$1"
local default="${2:-n}"
local response

if [ "$default" == "y" ]; then
prompt="$prompt [Y/n]: "
# Check if running in non-interactive mode (stdin is not a terminal)
if [ ! -t 0 ]; then
# Non-interactive: use default value without prompting
response=$default
else
prompt="$prompt [y/N]: "
fi
# Interactive mode: prompt user
if [ "$default" == "y" ]; then
prompt="$prompt [Y/n]: "
else
prompt="$prompt [y/N]: "
fi

read -p "$prompt" response
response=${response:-$default}
# Read from /dev/tty instead of stdin to avoid consuming piped script content
if [ -e /dev/tty ]; then
read -p "$prompt" response </dev/tty
else
# Fallback: if /dev/tty is not available, use default
response=$default
fi
response=${response:-$default}
fi

case "$response" in
[yY][eE][sS]|[yY])
Expand Down
Loading