Skip to content

Commit

Permalink
fix the currentbranch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
unlikelyzero committed Sep 24, 2024
1 parent c90d493 commit 84bb8b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.PHONY: all clone-quickstart install-quickstart start-quickstart install-openmct-yamcs sanity-test build-example test-getopensource test-e2e clean

all: clone-quickstart install-quickstart install-openmct-yamcs sanity-test build-example test-getopensource test-e2e
all: clone-quickstart install-quickstart install-openmct-yamcs sanity-test build-example test-e2e

start: clone-quickstart install-quickstart install-openmct-yamcs sanity-test build-example start-openmct

clone-quickstart:
@echo "Running target: clone-quickstart"
Expand Down Expand Up @@ -38,13 +40,17 @@ build-example:
@current_branch=$(shell git rev-parse --abbrev-ref HEAD)
@echo "Current branch of openmct-yamcs: $$current_branch checking if it exists in openmct repository"
@if git ls-remote --exit-code --heads https://github.com/nasa/openmct.git refs/heads/$$current_branch; then \
echo "Branch $$current_branch exists in openmct repository. Running build:example:current"; \
npm run build:example:current || { echo "Failed to run build:example:current"; exit 1; }; \
echo "Branch $$current_branch exists in openmct repository. Running build:example:currentbranch"; \
npm run build:example:currentbranch || { echo "Failed to run build:example:currentbranch"; exit 1; }; \
else \
echo "Branch $$current_branch does not exist in openmct repository. Running build:example:master"; \
npm run build:example:master || { echo "Failed to run build:example:master"; exit 1; }; \
fi

start-openmct:
@echo "Running target: start-openmct"
npm start

test-e2e:
@echo "Running target: test-e2e"
npm run test:getopensource
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build:dist": "webpack --config ./.webpack/webpack.prod.mjs",
"build:example": "npm install openmct@unstable --no-save",
"build:example:master": "npm install nasa/openmct#master --no-save",
"build:example:current": "npm install nasa/openmct#$(git rev-parse --abbrev-ref HEAD) --no-save --verbose",
"build:example:currentbranch": "npm install nasa/openmct#$(git rev-parse --abbrev-ref HEAD) --no-save --verbose",
"postbuild:example": "node check-optional-dependencies.mjs",
"start": "npx webpack serve --config ./.webpack/webpack.dev.mjs",
"start:coverage": "npx webpack serve --config ./.webpack/webpack.coverage.mjs",
Expand Down

0 comments on commit 84bb8b7

Please sign in to comment.