You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the build script will autocomplete a section in the _release.sql file. This script scrapes all the packages, views, and triggers and injects them into the release file.
@vincentmorneau had a good idea. Instead of listing all the files, only list files that have changed. This can reduce overall release time if the project has a lot objects or can be very helpful for small patch releases (think one or two file changes). Developers wouldn't need to track what they worked on.
This can be done fairly easily using git diff --name-only <src> <compare> where <src> is the source branch and <compare> is the compare to branch. In this case "branch" can be master, a tag, or a branch.
Ex: git diff --name-only master 0.2.0 will list all the files that have changed since in master since tag 0.2.0. Stackoverflow source.
The text was updated successfully, but these errors were encountered:
Pseudo code that might help with the development of this issue.
#!/bin/bash# current development tag
CURRENT_TAG="master"# pattern to match for git tags
MATCH_PATTERN="release-*"# used to get the latest tag using the above pattern
PREVIOUS_TAG=$(git describe --tags --abbrev=0 --match $MATCH_PATTERN)# hard coded value just for test
FILE="all_views.sql"# which directroy to check
DIR_CHECK="../views"# output variables to screen to seeecho"Current tag: "$CURRENT_TAGecho"Previous tag: "$PREVIOUS_TAG# execute command and output to file# Use--diff-filter to include on the files you need listed# A = Added / M = Modified / R = Renamedecho$(git diff --diff-filter=AMR --name-only $PREVIOUS_TAG$CURRENT_TAG$DIR_CHECK>$FILE)# prefix each line with view directory# there may be a better way other than using sed
sed -i "s\views\@$DIR_CHECK\g"$FILE
Currently the build script will autocomplete a section in the
_release.sql
file. This script scrapes all the packages, views, and triggers and injects them into the release file.@vincentmorneau had a good idea. Instead of listing all the files, only list files that have changed. This can reduce overall release time if the project has a lot objects or can be very helpful for small patch releases (think one or two file changes). Developers wouldn't need to track what they worked on.
This can be done fairly easily using
git diff --name-only <src> <compare>
where<src>
is the source branch and<compare>
is the compare to branch. In this case "branch" can bemaster
, a tag, or a branch.Ex:
git diff --name-only master 0.2.0
will list all the files that have changed since in master since tag 0.2.0. Stackoverflow source.The text was updated successfully, but these errors were encountered: