mirror of
https://github.com/Lakr233/GitLab-License-Generator.git
synced 2026-05-01 14:13:08 +03:00
fix: disable the need to download full gitlab source code during make.sh execution
This commit is contained in:
21
make.sh
21
make.sh
@@ -71,20 +71,13 @@ popd > /dev/null
|
|||||||
echo "[*] updated gem"
|
echo "[*] updated gem"
|
||||||
|
|
||||||
echo "[*] fetching gitlab source code..."
|
echo "[*] fetching gitlab source code..."
|
||||||
GITLAB_SOURCE_CODE_DIR=$(pwd)/temp/src/
|
GITLAB_SOURCE_CODE_DIR=$(pwd)/temp/src
|
||||||
if [ -d "$GITLAB_SOURCE_CODE_DIR" ]; then
|
|
||||||
echo "[*] gitlab source code already exists, skipping cloning..."
|
mkdir -p "$GITLAB_SOURCE_CODE_DIR"
|
||||||
else
|
chmod 0755 -R "$GITLAB_SOURCE_CODE_DIR"
|
||||||
echo "[*] cloning gitlab source code..."
|
echo "[*] downloading features file..."
|
||||||
git clone https://gitlab.com/gitlab-org/gitlab.git $GITLAB_SOURCE_CODE_DIR
|
curl -L https://gitlab.com/gitlab-org/gitlab/-/raw/master/ee/app/models/gitlab_subscriptions/features.rb?inline=false -o "$GITLAB_SOURCE_CODE_DIR/features.rb"
|
||||||
fi
|
|
||||||
|
|
||||||
echo "[*] updating gitlab source code..."
|
|
||||||
pushd $GITLAB_SOURCE_CODE_DIR > /dev/null
|
|
||||||
git clean -fdx -f > /dev/null
|
|
||||||
git reset --hard > /dev/null
|
|
||||||
git pull > /dev/null
|
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
BUILD_DIR=$(pwd)/build
|
BUILD_DIR=$(pwd)/build
|
||||||
mkdir -p $BUILD_DIR
|
mkdir -p $BUILD_DIR
|
||||||
@@ -94,7 +87,7 @@ FEATURE_LIST_FILE=$BUILD_DIR/features.json
|
|||||||
rm -f $FEATURE_LIST_FILE || true
|
rm -f $FEATURE_LIST_FILE || true
|
||||||
./src/scan.features.rb \
|
./src/scan.features.rb \
|
||||||
-o $FEATURE_LIST_FILE \
|
-o $FEATURE_LIST_FILE \
|
||||||
-s $GITLAB_SOURCE_CODE_DIR
|
-f "$GITLAB_SOURCE_CODE_DIR/features.rb"
|
||||||
|
|
||||||
echo "[*] generating key pair..."
|
echo "[*] generating key pair..."
|
||||||
PUBLIC_KEY_FILE=$BUILD_DIR/public.key
|
PUBLIC_KEY_FILE=$BUILD_DIR/public.key
|
||||||
|
|||||||
Reference in New Issue
Block a user