Skip to content

Commit

Permalink
fix release
Browse files Browse the repository at this point in the history
  • Loading branch information
danyworks committed Sep 21, 2024
1 parent 3e5120b commit d08ea3d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- main

env:
repo: ghcr.io/atonomic/containers
repo: ghcr.io/atonomic/scrapegoat
context_path: .
image: scrapegoat
tag: 0.1.0
Expand Down
20 changes: 18 additions & 2 deletions main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ elif current_platform == 'darwin':
chrome_portable_path = './chrome_portable/chrome-mac-x64/'
chromedriver_path = './chromedriver/chromedriver-mac-x64/'
chromedriver_binary = 'chromedriver'
chrome_binary = 'chrome'
chrome_binary = 'Google Chrome.app/Contents/MacOS/Google Chrome'
else: # Linux
exe_name = 'scrapegoat_linux'
build_path = '/home/runner/work/scrapegoat/scrapegoat/dist/'
Expand Down Expand Up @@ -61,6 +61,22 @@ a = Analysis(
noarchive=False,
)

# Add Chrome and ChromeDriver to the binary collection
chrome_files = []
chromedriver_files = []

if current_platform.startswith('win'):
chrome_files = [(os.path.join(chrome_portable_path, file), f'chrome_portable/{file}') for file in os.listdir(chrome_portable_path)]
chromedriver_files = [(os.path.join(chromedriver_path, file), f'chromedriver/{file}') for file in os.listdir(chromedriver_path)]
elif current_platform == 'darwin':
chrome_files = [(os.path.join(chrome_portable_path, file), f'chrome_portable/{file}') for file in os.listdir(chrome_portable_path)]
chromedriver_files = [(os.path.join(chromedriver_path, file), f'chromedriver/{file}') for file in os.listdir(chromedriver_path)]
else: # Linux
chrome_files = [(os.path.join(chrome_portable_path, file), f'chrome_portable/{file}') for file in os.listdir(chrome_portable_path)]
chromedriver_files = [(os.path.join(chromedriver_path, file), f'chromedriver/{file}') for file in os.listdir(chromedriver_path)]

a.binaries += chrome_files + chromedriver_files

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
Expand Down Expand Up @@ -97,4 +113,4 @@ if not os.path.exists(build_path):
os.makedirs(build_path)

import shutil
shutil.move(os.path.join('dist', 'scrapegoat'), os.path.join(build_path, 'scrapegoat'))
shutil.move(os.path.join('dist', 'scrapegoat'), build_path)
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sonar.projectKey=atonomic_scrapegoat
sonar.organization=atonomic

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=-ScrapeGoat
sonar.projectName=ScrapeGoat
sonar.projectVersion=0.1.0


Expand Down

0 comments on commit d08ea3d

Please sign in to comment.