mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Detect changes in Cargo.lock and Cargo.toml (#2669)
This commit is contained in:
parent
e15718e16d
commit
efc044d498
5 changed files with 12 additions and 23 deletions
2
.github/workflows/apollo-router-updater.yaml
vendored
2
.github/workflows/apollo-router-updater.yaml
vendored
|
|
@ -7,7 +7,7 @@ on:
|
|||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
deployment:
|
||||
update:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: checkout
|
||||
|
|
|
|||
26
.github/workflows/publish-rust.yaml
vendored
26
.github/workflows/publish-rust.yaml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
- name: Look for changes
|
||||
id: rust_changed
|
||||
run: |
|
||||
lines=$( git diff HEAD~ HEAD --name-only -- 'packages/libraries/router' | wc -l )
|
||||
lines=$( git diff HEAD~ HEAD --name-only -- 'packages/libraries/router' 'Cargo.toml' 'configs/cargo/Cargo.lock' | wc -l )
|
||||
if [ $lines -gt 0 ]; then
|
||||
echo 'rust_changed=true' >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
|
@ -40,25 +40,13 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: check pnpm version
|
||||
shell: bash
|
||||
id: pnpm
|
||||
run: |
|
||||
PNPM_VERSION=$(cat package.json | jq -r '.packageManager' | awk -F@ '{print $2}')
|
||||
PNPM_VERSION=${PNPM_VERSION:-8}
|
||||
echo "Using PNPM version $PNPM_VERSION"
|
||||
echo "version=$PNPM_VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: install pnpm
|
||||
uses: pnpm/action-setup@v2.2.4
|
||||
- name: setup environment
|
||||
uses: ./.github/actions/setup
|
||||
with:
|
||||
version: ${{ steps.pnpm.outputs.version }}
|
||||
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@v3.6.0
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: 'pnpm'
|
||||
actor: publish-rust
|
||||
codegen: false
|
||||
cacheNext: false
|
||||
cacheTurbo: false
|
||||
|
||||
- name: Prepare MacOS
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
name = "graphql-hive-router"
|
||||
version = "0.0.1"
|
||||
authors = ["Kamil Kisiela <kamil.kisiela@gmail.com>"]
|
||||
repository = "https://github.com/kamilkisiela/graphql-hive/"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
publish = false
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ if [[ $(uname -s) == CYGWIN* ]]; then
|
|||
del /f ./Cargo.lock
|
||||
mklink ./Cargo.lock ./configs/cargo.Cargo.lock
|
||||
else
|
||||
echo Unix need no fixes
|
||||
echo Unix needs no fixes
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import rimraf from 'rimraf';
|
|||
|
||||
const cwd = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
|
||||
const cacheDir = 'node_modules/.cache/turbo';
|
||||
const cacheDir = path.join('node_modules', '.cache', 'turbo');
|
||||
const cleanupDateFile = path.resolve(cwd, cacheDir, 'last-cleanup.txt');
|
||||
|
||||
function main() {
|
||||
|
|
@ -34,7 +34,7 @@ function main() {
|
|||
|
||||
console.log('[turborepo-cleanup] Cleaning up the cache.');
|
||||
|
||||
rimraf.sync(path.resolve(cwd, cacheDir, '*'));
|
||||
rimraf.sync(path.resolve(cwd, cacheDir));
|
||||
fs.mkdirSync(path.resolve(cwd, cacheDir), { recursive: true });
|
||||
fs.writeFileSync(cleanupDateFile, Date.now().toString(), 'utf-8');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue