Changeset - 7ea1116e5a17
[Not reviewed]
0 1 0
Branko Majic (branko) - 2 years ago 2022-08-21 15:47:42
branko@majic.rs
[factorio_development.sh] Use long options for git commands where available:

- Improves readability of code.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general) First comment
games/factorio_development.sh
Show inline comments
 
@@ -857,14 +857,14 @@ function command_release() {
 
        local git_tag_gpgsign=()
 
    fi
 

	
 
    # Commit the changes and create a tag. GIT_VERSION_TAG_PREFIX
 
    # comes from build configuration.
 
    if ! git -C "$base_dir" add "$changelog_file" "$info_file" || \
 
       ! git -C "$base_dir" commit --edit -m "Prepared release $version." || \
 
       ! git -C "$base_dir" tag "${git_tag_gpgsign[@]}" -a -m "Release $version." "${GIT_VERSION_TAG_PREFIX}${version}"; then
 
       ! git -C "$base_dir" commit --edit --message "Prepared release $version." || \
 
       ! git -C "$base_dir" tag "${git_tag_gpgsign[@]}" --annotate --message "Release $version." "${GIT_VERSION_TAG_PREFIX}${version}"; then
 

	
 
        error "Failed to create release commit and tag."
 
        return 1
 
    fi
 

	
 
    # Switch back to development version.
 
@@ -880,13 +880,13 @@ $(cat "$changelog_file")
 
EOF
 
                )
 
    echo "$changelog" > "$changelog_file"
 

	
 
    # Commit the changes.
 
    if ! git -C "$base_dir" add "$changelog_file" "$info_file" || \
 
       ! git -C "$base_dir" commit -m "Switched back to development version."; then
 
       ! git -C "$base_dir" commit --message "Switched back to development version."; then
 
        error "Failed to create developement commit."
 
        return 1
 
    fi
 

	
 
    return 0
 
}
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now