Skip to content

Commit

Permalink
Update directly executed scripts inside workflows (#1107)
Browse files Browse the repository at this point in the history
* Update directly executed scripts on workflows

Signed-off-by: thepetk <thepetk@gmail.com>

* Update directly executed scripts on bash scripts

Signed-off-by: thepetk <thepetk@gmail.com>

---------

Signed-off-by: thepetk <thepetk@gmail.com>
  • Loading branch information
thepetk authored Apr 26, 2023
1 parent 079e7df commit 35306e9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ jobs:

- name: Generate Go sources, CRDs and schemas
run: |
./docker-run.sh ./build.sh
bash ./docker-run.sh ./build.sh
if [[ ! -z $(git status -s) ]]
then
echo 'Command `./docker-run.sh ./build.sh` did introduce changes, which should not be the case if it had been run as part of the PR. Please run it locally and check in the results as part of your PR.'
echo 'Command `bash ./docker-run.sh ./build.sh` did introduce changes, which should not be the case if it had been run as part of the PR. Please run it locally and check in the results as part of your PR.'
git --no-pager diff
exit 1
fi
- name: Validate samples against schemas
run: ./docker-run.sh ./validate-samples.sh
run: bash ./docker-run.sh ./validate-samples.sh

- name: Run GO tests
run: go test -coverprofile cover.out -v ./...
Expand All @@ -45,7 +45,7 @@ jobs:
uses: codecov/codecov-action@v2.1.0

- name: Check typescript model generation
run: ./build/typescript-model/generate.sh
run: bash ./build/typescript-model/generate.sh

- name: Check GO mod state
run: |
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/securego/gosec/v2/cmd/gosec@v2.14.0
./run_gosec.sh
bash ./run_gosec.sh
if [[ $? != 0 ]]
then
echo "gosec scanner failed to run "
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-typescript-models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Generate typescript model
run: |
./build/typescript-model/generate.sh
bash ./build/typescript-model/generate.sh
cp -r ./build/typescript-model/workdir/typescript-models ../
working-directory: api

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ onError() {
}
trap 'onError' ERR

"${BASE_DIR}"/build-generator.sh
bash "${BASE_DIR}"/build-generator.sh

cd "${BASE_DIR}"

Expand Down
2 changes: 1 addition & 1 deletion build/typescript-model/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EOF
echo "[INFO] Lauching gen to generate typescript files based on swagger json"
export OPENAPI_SKIP_FETCH_SPEC=true
export OPENAPI_GENERATOR_COMMIT="v6.3.0"
$WORK_DIR/gen/openapi/typescript.sh $WORK_DIR/typescript-models $WORK_DIR/config.sh
bash $WORK_DIR/gen/openapi/typescript.sh $WORK_DIR/typescript-models $WORK_DIR/config.sh

sed -i 's/\"name\": \".*\"/"name": "@devfile\/api"/g' $WORK_DIR/typescript-models/package.json
sed -i 's/\"description\": \".*\"/"description": "Typescript types for devfile api"/g' $WORK_DIR/typescript-models/package.json
Expand Down
2 changes: 1 addition & 1 deletion make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ setVersionAndBuild() {
apply_sed "s#jsonschema:version=.*#jsonschema:version=${SCHEMA_VERSION}#g" pkg/apis/workspaces/$K8S_VERSION/doc.go #src/constants.ts

# Generate the schema
./build.sh
bash ./build.sh
}

commitChanges() {
Expand Down

0 comments on commit 35306e9

Please sign in to comment.