Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
G GitLabChangelogGen
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Common
  • GitLabChangelogGen
  • Issues
  • #1

Closed
Open
Created Apr 05, 2018 by Jose Miguel Espadero@jespaDeveloper

Some recomentations

Hi @ptoharia,

I have some small bugfixes and recommendations to your gitlabChangelogGen.sh script

  1. I'm pretty sure that line 4 should use 2>&1and not 2>1

  2. You are creating a temporally file named ".LOG", that should be deleted at the end of the script.

  3. Even better that create ".LOG" and delete at the end, is the use of a string variable. Is faster, is safer and better in many senses.

Instead of this:

LOG=.__LOG__
git log 2>1 > ${LOG}
for mrLine in `cat ${LOG} | grep See -n | cut -d: -f1`;
do
...
done

try this:

LOG=$(git log 2>&1 )
for mrLine in `echo "${LOG}" | grep See -n | cut -d: -f1`;
do
...
done
Edited Apr 05, 2018 by Jose Miguel Espadero
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking