Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghostscript 10.03.1 #12

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Ghostscript 10.03.1 #12

merged 1 commit into from
Jun 26, 2024

Conversation

jwaisner
Copy link
Contributor

@jwaisner jwaisner commented Jun 19, 2024

PR Type

Enhancement, Configuration changes


Description

  • Added a batch script (update_cidfmap.bat) to update the CID font map using Ghostscript.
  • Introduced a new configuration file (bearsampp.conf) for Ghostscript version 10.03.1, specifying executable paths and bundle release version.
  • Updated the build.properties file to reflect the new bundle release date of 2024.06.18.
  • Added a new release entry for Ghostscript 10.03.1 in the releases.properties file with the corresponding download URL.

Changes walkthrough 📝

Relevant files
Enhancement
update_cidfmap.bat
Add batch script for updating CID font map                             

bin/ghostscript10.03.1/update_cidfmap.bat

  • Added a batch script to update the CID font map.
  • Script sets the working directory and executes Ghostscript with
    specific parameters.
  • +4/-0     
    Configuration changes
    bearsampp.conf
    Add configuration file for Ghostscript 10.03.1                     

    bin/ghostscript10.03.1/bearsampp.conf

  • Added configuration file for Ghostscript version 10.03.1.
  • Defined executable paths and bundle release version.
  • +5/-0     
    build.properties
    Update bundle release date in build properties                     

    build.properties

    • Updated bundle release date to 2024.06.18.
    +1/-1     
    releases.properties
    Add new release entry for Ghostscript 10.03.1                       

    releases.properties

    • Added new release entry for Ghostscript 10.03.1 with download URL.
    +1/-0     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @jwaisner jwaisner requested a review from N6REJ as a code owner June 19, 2024 02:51
    @jwaisner jwaisner added enhancement ✨ Improve program Security 🔐 Security issue labels Jun 19, 2024
    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review [1-5] 2
    🧪 Relevant tests No
    🔒 Security concerns No
    ⚡ Key issues to review Hardcoded Paths:
    The batch script update_cidfmap.bat uses hardcoded paths (e.g., c:/windows/fonts). This might not work on all systems or configurations. Consider using environment variables or configuration files to specify paths.
    Placeholder Value:
    The bearsampp.conf file uses a placeholder @RELEASE_VERSION@ for bundleRelease. Ensure this placeholder is correctly replaced during the build or deployment process.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Add error handling for the cd command to ensure the script runs in the correct directory

    Add error handling to check if the cd command fails, which can prevent the script from
    running in the wrong directory.

    bin/ghostscript10.03.1/update_cidfmap.bat [3-4]

    -cd %~dp0
    +cd %~dp0 || (echo Failed to change directory & exit /b 1)
     bin\gswin64c.exe -q -dBATCH -sFONTDIR=c:/windows/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Adding error handling for the cd command is crucial to ensure the script does not continue execution in an incorrect directory, which could lead to serious errors.

    8
    Best practice
    Use double quotes around paths to handle spaces in directory names

    Use double quotes around the paths to handle any spaces in directory names.

    bin/ghostscript10.03.1/update_cidfmap.bat [4]

    -bin\gswin64c.exe -q -dBATCH -sFONTDIR=c:/windows/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
    +"bin\gswin64c.exe" -q -dBATCH -sFONTDIR="c:/windows/fonts" -sCIDFMAP="lib/cidfmap" "lib/mkcidfm.ps"
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Using double quotes around paths is a best practice that prevents errors when directory names contain spaces, thus improving the robustness of the script.

    7
    Ensure date formats are consistent by using leading zeros for single-digit months and days

    Ensure consistency in date formats by using a leading zero for single-digit months and
    days.

    releases.properties [6]

    -10.03.1 = https://github.com/Bearsampp/module-ghostscript/releases/download/2024.6.18/bearsampp-ghostscript-10.03.1-2024.06.18.7z
    +10.03.1 = https://github.com/Bearsampp/module-ghostscript/releases/download/2024.06.18/bearsampp-ghostscript-10.03.1-2024.06.18.7z
     
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: Ensuring consistent date formats in URLs is important for maintainability and readability, although it's a minor issue in this context.

    6

    @N6REJ N6REJ merged commit 8da4591 into main Jun 26, 2024
    2 checks passed
    @N6REJ N6REJ deleted the ghostscript10.03.1 branch June 26, 2024 04:00
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    enhancement ✨ Improve program Security 🔐 Security issue
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants