[go: up one dir, main page]

Skip to content

Commit

Permalink
build: get branch name by env
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLYC committed May 23, 2023
1 parent 2f3694f commit d7f1ff9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- name: Integration tests
run: integration-tests/start.sh
run: |
export cmdr_branch="${GITHUB_REF#refs/heads/}"
integration-tests/start.sh
6 changes: 3 additions & 3 deletions integration-tests/start.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

root_dir="$(dirname $0)"
export CMDR_LOG_LEVEL=debug CMDR_CORE_CONFIG_PATH=/tmp/cmdr.yaml CMDR_CORE_ROOT_DIR=$(pwd)/.cmdr CMDR_CORE_PROFILE_DIR=$(pwd)/profile

set -e
export CMDR_LOG_LEVEL=debug CMDR_CORE_CONFIG_PATH=/tmp/cmdr.yaml CMDR_CORE_ROOT_DIR=$(pwd)/.cmdr CMDR_CORE_PROFILE_DIR=$(pwd)/profile

./install.sh -d 30

Expand All @@ -13,8 +13,8 @@ set -x

newest_version=$(cmdr version)

commit_hash="$(git rev-parse HEAD)"
cmdr command install -a -n cmdr -v "0.0.0" -l "go://github.com/mrlyc/cmdr@${commit_hash}"
branch="${cmdr_branch:-$(git rev-parse --abbrev-ref HEAD)}"
cmdr command install -a -n cmdr -v "0.0.0" -l "go://github.com/mrlyc/cmdr@${branch}"
cmdr init --upgrade

cmdr command list -n cmdr
Expand Down

0 comments on commit d7f1ff9

Please sign in to comment.