Skip to content

Commit

Permalink
Do not call git pull in build workflow to fix build on pr branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Exidex committed Jan 11, 2025
1 parent 033f2c8 commit d3ac379
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/setup-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
- run: sudo apt-get install -y libxkbcommon-dev

- uses: actions/checkout@v4
with:
submodules: true
- run: git pull

- uses: actions/setup-node@v4
with:
node-version: 22
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/setup-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
echo Killing XProtect.; sudo pkill -9 XProtect >/dev/null || true;
- uses: actions/checkout@v4
with:
submodules: true
- run: git pull

- uses: actions/setup-node@v4
with:
node-version: 22
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/setup-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: git pull

- uses: actions/setup-node@v4
with:
node-version: 22
Expand Down
23 changes: 22 additions & 1 deletion js/build/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,23 @@ async function doBuildLinux() {
const arch = 'x86_64-unknown-linux-gnu';
const projectRoot = getProjectRoot();

const git = simpleGit(projectRoot);

console.log("git pull...")
await git.pull()

await doBuild(projectRoot, arch)
packageForLinux(projectRoot, arch)
}

async function doPublishMacOS() {
const projectRoot = getProjectRoot();

const git = simpleGit(projectRoot);

console.log("git pull...")
await git.pull()

const arch = 'aarch64-apple-darwin';

build(projectRoot, arch)
Expand All @@ -129,6 +139,11 @@ async function doBuildMacOS() {
async function doPublishWindows() {
const projectRoot = getProjectRoot();

const git = simpleGit(projectRoot);

console.log("git pull...")
await git.pull()

const arch = 'x86_64-pc-windows-msvc';

build(projectRoot, arch)
Expand All @@ -147,9 +162,15 @@ async function doBuildWindows() {
}

async function doPublishFinal() {
console.log("Publishing Gauntlet npm packages...")
const projectRoot = getProjectRoot()

const git = simpleGit(projectRoot);

console.log("git pull...")
await git.pull()

console.log("Publishing Gauntlet npm packages...")

buildJs(projectRoot)

await publishNpmPackage(projectRoot)
Expand Down

0 comments on commit d3ac379

Please sign in to comment.